Jump to content

Yoshi

Member
  • Posts

    382
  • Joined

  • Last visited

  • Days Won

    7

Reputation Activity

  1. Like
    Yoshi reacted to Chewett in MD 16th Anniversary Plushie Auction   
    By my reckoning this is over! As long as I hear no complaints that the above totals are wrong I will go ahead distributing the purchases!
  2. Like
    Yoshi reacted to Nep in The inner workings of Memory Stone Detectors [16th anniversary quest]   
    Yes, adding pictures won't change the score, I didn't want to make it a factor because many people don't like to draw. That said, thank you for submitting it  
    Here is the breakdown of your score: 
     
    Anyway, sorry for the delay, again. (I've been rather busy with the tax man lately.) I'll submit the scores to Chewett in a few minutes. 
  3. Upvote
    Yoshi got a reaction from Pipstickz in The inner workings of Memory Stone Detectors [16th anniversary quest]   
    Unfortunately I was unable to scan this picture earlier, or take a picture of it. Even though it's late, and I don't suspect it will increase my score, I feel that I should post it nonetheless.

    I would be curious in the breakdown of my submission, either on here or privately.


  4. Upvote
    Yoshi got a reaction from Fang Archbane in The inner workings of Memory Stone Detectors [16th anniversary quest]   
    Unfortunately I was unable to scan this picture earlier, or take a picture of it. Even though it's late, and I don't suspect it will increase my score, I feel that I should post it nonetheless.

    I would be curious in the breakdown of my submission, either on here or privately.


  5. Like
    Yoshi reacted to Nep in The inner workings of Memory Stone Detectors [16th anniversary quest]   
    The results are in! I'd like to thank everyone for their participation. Without further ado, here is the result I came up with: 

    Allow me to explain the logic behind the scores. 
    The winner is determined by total points.  The "detail" column represents how well you explained your concept. Everyone starts from 10 points, the subtractions represent details I was missing (in most cases this was because you explained "how" a certain thing works, but not "why"). I also took into consideration how well you explained your concept relative to the other submissions.  The "lore / realism" column also starts from 10 points, but in this case you get points subtracted for inaccuracies regarding how things work in MD, OR if the mechanism you describe is somewhat questionable in my opinion. Since nobody really knows how a memory stone detector works, this is a very grey area. And because of that, it's nearly impossible to get max points for this, so keep that in mind.  The "Uniqueness" column has 5 points as a maximum (equal to the number of entries, so 1 point per entry). How it works is that you get 1 point subtracted for every other player who submitted a similar concept. There were only 2 cases like this, both of them used heat signals but other than that they are pretty different too...  Also, please keep in mind that these things are very subjective. Just because you did not win this time, doesn't mean I do not like your design. Anyway. 
    I will start posting the submissions in short order.
    You have until tomorrow 23:00 server time to contest the result (11th of May). If nobody complains until then, the result will be final and I'll submit it to Chewett and I'll begin handing out rewards as soon as I can. 
    Those of you who did not make it to the top 3 will get a 10 silver note each from me for your efforts. 
    As for the submissions. When I came up with this quest. I was hoping for one of two things:
    Either some kind of common theme in the submissions that would hopefully help us determine how the damn thing works.
    OR
    A different idea for each submission. 
    The latter happened basically  Even though 2 of the submissions use heat signals for detection, that's about the only things they have in common...
    What this means I do not know, but it was a fun experiment regardless. 
  6. Like
    Yoshi reacted to Demonic God in Rock, paper, scissors!   
    So let's start the competition!
    As we have cases of ties for top position (the criteria for elimination being least wins > most loses > losing to all others performing similarly) for each individual "mini tournament", I've devised two system to keep track of performance:
    Counting wins - including shared All winners shares a point pool of 2520, divided to all winners (2520 being the least common multiple for 1 - 10, as we have 10 participants), Totaling to 25,200,000 points In addition, I've also logged every individual face-off to determine how well a strategy does into another, so you can view each pairing performance!
    Hopefully I made no mistake while translating the strategies. But as time constraint, this is as much testing I can do.
    CC'ing the participants:
    @Aia del Mana, @Nepgear, @Else, @Dracoloth, @Pipstickz, @Ledah, @Aelis, @Yoshi, @Kaya, @Tissy 
    The tournament will be ran 10,000 times. As Chew pointed out, a larger number would be better to show a clear trend, and as the simulator can be ran as many time as needed, why not even more?
    Below you can find the compressed file for the final version of codes used. It includes all player strategies, and some strategies used for testing purposes.
    MD RPC.rar
    Without further ado... here are the top performers:
    Points:
    Kaya - 15,554,496 Tissy - 4,392,408 Else - 3,094,608 Wins:
    Kaya - 6804 Tissy - 2779 Else - 2144 As there's no discrepancy between the ordering, the top 3 winners are as such. Congratulations!
    Here's the full performance sheet from all participants:
    Cumulative wins: Kaya: 6804 wins Else: 2144 wins Dracoloth: 1368 wins Tissy: 2779 wins Yoshi: 435 wins Aia: 537 wins Pipstickz: 5 wins Aelis: 3 wins Cumulative points: Kaya: 15554496 points Else: 3094608 points Dracoloth: 1343460 points Tissy: 4392408 points Yoshi: 312024 points Aia: 495144 points Pipstickz: 3240 points Aelis: 4620 points Aia's cumulative match results: Aelis: 30867 wins, 0 loses, 0 draws Yoshi: 0 wins, 44920 loses, 0 draws Kaya: 3225 wins, 42405 loses, 0 draws Tissy: 45289 wins, 0 loses, 0 draws Else: 0 wins, 44206 loses, 0 draws Ledah: 17408 wins, 0 loses, 0 draws Pipstickz: 0 wins, 30632 loses, 0 draws Dracoloth: 45061 wins, 0 loses, 0 draws Nepgear: 17984 wins, 0 loses, 0 draws Aelis's cumulative match results: Aia: 0 wins, 30867 loses, 0 draws Else: 0 wins, 31326 loses, 0 draws Yoshi: 0 wins, 31044 loses, 0 draws Pipstickz: 18369 wins, 6765 loses, 0 draws Tissy: 30762 wins, 0 loses, 0 draws Kaya: 5849 wins, 25100 loses, 0 draws Dracoloth: 0 wins, 0 loses, 31342 draws Nepgear: 10780 wins, 0 loses, 6165 draws Ledah: 11045 wins, 3438 loses, 0 draws Ledah's cumulative match results: Kaya: 6523 wins, 10592 loses, 0 draws Tissy: 0 wins, 17408 loses, 0 draws Dracoloth: 0 wins, 17408 loses, 0 draws Else: 16974 wins, 0 loses, 0 draws Pipstickz: 13645 wins, 0 loses, 0 draws Aia: 0 wins, 17408 loses, 0 draws Nepgear: 0 wins, 10546 loses, 0 draws Yoshi: 0 wins, 17408 loses, 0 draws Aelis: 3438 wins, 11045 loses, 0 draws Kaya's cumulative match results: Ledah: 10592 wins, 6523 loses, 0 draws Aia: 42405 wins, 3225 loses, 0 draws Tissy: 36398 wins, 25519 loses, 0 draws Dracoloth: 50136 wins, 9526 loses, 0 draws Aelis: 25100 wins, 5849 loses, 0 draws Pipstickz: 1170 wins, 34551 loses, 0 draws Yoshi: 49919 wins, 3117 loses, 0 draws Nepgear: 16466 wins, 1368 loses, 0 draws Else: 36806 wins, 20579 loses, 0 draws Tissy's cumulative match results: Ledah: 17408 wins, 0 loses, 0 draws Dracoloth: 59247 wins, 0 loses, 0 draws Aia: 0 wins, 45289 loses, 0 draws Else: 0 wins, 56006 loses, 0 draws Aelis: 0 wins, 30762 loses, 0 draws Pipstickz: 36655 wins, 0 loses, 0 draws Nepgear: 17984 wins, 0 loses, 0 draws Kaya: 25519 wins, 36398 loses, 0 draws Yoshi: 52312 wins, 0 loses, 0 draws Dracoloth's cumulative match results: Ledah: 17408 wins, 0 loses, 0 draws Tissy: 0 wins, 59247 loses, 0 draws Else: 55622 wins, 0 loses, 0 draws Pipstickz: 36644 wins, 0 loses, 0 draws Kaya: 9526 wins, 50136 loses, 0 draws Nepgear: 0 wins, 6251 loses, 11683 draws Yoshi: 53086 wins, 0 loses, 0 draws Aelis: 0 wins, 0 loses, 31342 draws Aia: 0 wins, 45061 loses, 0 draws Else's cumulative match results: Aelis: 31326 wins, 0 loses, 0 draws Dracoloth: 0 wins, 55622 loses, 0 draws Aia: 44206 wins, 0 loses, 0 draws Tissy: 56006 wins, 0 loses, 0 draws Ledah: 0 wins, 16974 loses, 0 draws Nepgear: 0 wins, 17876 loses, 0 draws Pipstickz: 36641 wins, 0 loses, 0 draws Yoshi: 0 wins, 50990 loses, 0 draws Kaya: 20579 wins, 36806 loses, 0 draws Yoshi's cumulative match results: Aia: 44920 wins, 0 loses, 0 draws Aelis: 31044 wins, 0 loses, 0 draws Pipstickz: 23884 wins, 10671 loses, 0 draws Nepgear: 17984 wins, 0 loses, 0 draws Dracoloth: 0 wins, 53086 loses, 0 draws Else: 50990 wins, 0 loses, 0 draws Tissy: 0 wins, 52312 loses, 0 draws Ledah: 17408 wins, 0 loses, 0 draws Kaya: 3117 wins, 49919 loses, 0 draws Pipstickz's cumulative match results: Aelis: 6765 wins, 18369 loses, 0 draws Yoshi: 10671 wins, 23884 loses, 0 draws Dracoloth: 0 wins, 36644 loses, 0 draws Tissy: 0 wins, 36655 loses, 0 draws Ledah: 0 wins, 13645 loses, 0 draws Aia: 30632 wins, 0 loses, 0 draws Else: 0 wins, 36641 loses, 0 draws Nepgear: 17037 wins, 0 loses, 0 draws Kaya: 34551 wins, 1170 loses, 0 draws Nepgear's cumulative match results: Tissy: 0 wins, 17984 loses, 0 draws Else: 17876 wins, 0 loses, 0 draws Ledah: 10546 wins, 0 loses, 0 draws Yoshi: 0 wins, 17984 loses, 0 draws Dracoloth: 6251 wins, 0 loses, 11683 draws Pipstickz: 0 wins, 17037 loses, 0 draws Aelis: 0 wins, 10780 loses, 6165 draws Kaya: 1368 wins, 16466 loses, 0 draws Aia: 0 wins, 17984 loses, 0 draws I'll let the players decide if they want to explain their strategy themselves. I'll be posting my commentary (and the missing strategies) later
  7. Like
    Yoshi reacted to Chewett in Rock, paper, scissors!   
    You likely will want to run the simulation a good number of times (at least 100 times but probably 1000 or more) to even out the effect that the random start has.
    Either that or run one run for every permutation of random ordering.
  8. Upvote
    Yoshi reacted to Demonic God in Rock, paper, scissors!   
    Codes sent to most participants. I'm eager to announce the observations
    There are some really, really fascinating interaction going on
  9. Like
    Yoshi reacted to Demonic God in Rock, paper, scissors!   
    Ehem, there are some new development during trial runs!
    Apparently, a lot of you have strategies relying on observation and rounds! And other stuff.
    Which led to an interesting thing: There's no definite winner. Those strategies works really, really well, and depending on the ordering, can change the winner completely.
    So I present the following two compromises:
    We run the simulations 100 times, and tally up! We run it 1 time, and let whoever wins, wins. I've also updated the judging rules a bit on draws and such. As well as how second spots are chosen.
  10. Like
    Yoshi reacted to Demonic God in Trickster's ball   
    Here is the final list of all who submitted a correct solution!
    @Aia del Mana @Aelis @Dracoloth @Fyrd Argentus @Tissy @Trola @Yoshi Please let me know which spellstone you want here or via PM. I'll try to get them to you before the next anni
    Also:
    Lady Aia wins an extra GC for having a correct solution less than30 minutes after the quest went online!
    As for the anni crits - well, it's hard to say, rather, since there was two particular methods that people used to solve this problem:
    Observing that the balls slowly move towards the two corners, 1 cm at a time, every 2 bounces. Thus, it took 2020 (smaller edges) x 2 (bounces per cm) x 2 (back and forth) - 1 = 8079 bounces Tracing the bounces for smaller n/(n+1) rectangles, and finding a general formula of 4 * n - 1. As such, the winners were selected as the solutions that stood out the most to me, for each of this category. Hence:
    Tissy wins an anni, for a creative solution (that actually resembles a general case solution for any n x m rectangle and any starting launch angle, that I know of). While he did eventually returned to the 1cm logic, his way of reaching it stood out Yoshi wins an anni, for observing the pattern (with pictures demonstrating the bounces) for smaller rooms, before concluding on the general formula.
  11. Upvote
    Yoshi got a reaction from Granos in Perspective: Void   
    The Null and The Void
      The Void is calling, whispering silent screams for me. Do I let them be, or do I give in to the falling?
      I cannot surely ignore the beckon, for I am afraid that I am weak. Do I only take a peek, for it would merely be a second?
      A wonder to stare into its depth, only to be consumed. Would I eventually be exhumed, or left without breath?
      Seconds turn to hours, and with time it all grows larger. Would I be able to departure, or be trapped in all the flowers?
      Perhaps to master the Void, one must be a Null. But before I try to cull, must I not be undestroyed?
      To be a Null would be an achievement, to be something not important. But is something so forgotten, even truly worth attainment?
      If in the end the Void cares not for me, I fear I would not care about myself. Is it worth losing sight of yourself, only for a taste of impossibility?
      I must learn to preserve myself, especially in darkest times. Can I walk between the lines, and put the fear up on the shelf?
      I feel I must remain steadfast, and not be coerced to either side. But how long can I run and hide, from the dead hand of the past?
      I will refrain today from looking, for the Void will not be winning. But will tomorrows bringing, make it all again alluring?
      The Void is calling, whispering silent screams for me. Do I let them be, or do I give in to the falling?
  12. Like
    Yoshi reacted to Granos in Perspective: Void   
    As many of you know, this is a subject I am quite fond of. I share similar views with many of you and some will differ. Given I am The Seeker of The Void I figure I should at least leave some input on this.
    To me the void is both tangible yet intangible. It is what the beginning and the end will and are. Some will claim that the void is associated with darkness, like a great blackness that just engulfs all things. While this may not be wrong, I see it more in line with a great whiteness(the potential for all colors). When you break things down into very basic ideas, there are two colour pathways. On one path you can see that black pigment is an amalgamation of all the colors while absorbing everything, and you have white which is the absence of color. Then on the other path you have the opposite. You can see that white light is an amalgamation of all the colors while absorbing everything, and you have black which is the absence of color. Statements such as 'white is the absence of color' is both true and false but it comes down to our perspective, knowledge, and how we attempt to perceive that which is supposedly imperceivable. To me the void is limitless but also finite at the same time, such as the infinity sign, each side has limited space but still continues on forever. It is all that we cannot comprehend. Thus when we attempt to understand or quantify it, our perceptions are tainted by that which we cannot possibly understand. Our minds simply are not equipped for it. 
    A small example now:

    Imagine a giant circle. That circle is then surrounded by numerous other smaller circles. Let us call the giant circle MD(Magicduel), and the smaller ones the players. Each smaller circle has a line connecting itself to the larger one, connected to other lines and smaller circles within, which we can call our avatars. The space outside these circles can be called the void. Eventually over time these circles erode and crack, and through these cracks we catch glimpses of the void, but our minds cannot understand this. These cracks show up in many ways, one of the most common is with mental illness, that is my Taint. They become tainted by something they cannot understand. So we begin to fill the gaps that we cannot comprehend with information, and things we know from our own realties. These can be called numerous things from hallucinations to visions, or even that sense of deju vu(ghosts, demons or even aliens). Our minds know something is not as it should be, thus they replace these glimpses of the void which we will never comprehend, with what we have of our own memories.
    I can go on about ideas and thoughts on the void but for now this will have to suffice. Feel free to come speak with me on this or other topics...
  13. Like
    Yoshi reacted to Poppi Chullo in MD Birthday 2021 - Day 15 - The day of the past   
    Just yesterday I posted a status about how I miss one of my old comrades Neno Veliki.
    He is one of the few friends in this realm who knows a lot about me, both inside and outside the game.
    We started the game almost at the same time, we were newbies together, growing together, even doing bad things together (not something to be proud of of course, but it's part of the lesson we should have gone through to become better players).
    He never said no to anything I asked for, from the simple to the craziest one.
    I still remember how he helped me when I struggled to get my golden head trophy (because of the time zone difference that killed me), I remember how he accompanied me online, collected the heads for me, and protected me while I slept. What an angel.
    When some time ago I decided to go on hiatus and occasionally visit this realm, I saw him growing up as one of the great and respected player, using his talents to help develop this game and helping many people with his works. I'm so proud.
    I don't think he's gone yet, I think he's still around, it's just feel like I need to leave this post here, as a reminder for me and everyone, that there will always be someone in this realm you can always count on, as a partner, and as a friend.
    Neno Veliki (Nenad the Great), is an embodiment of integrity and loyalty.
    I wish him all the best for everything he is going through and will go through.
  14. Upvote
    Yoshi reacted to Pipstickz in MD Birthday 2021 - Day 15 - The day of the past   
    I remember Khalazdad, a legendary storyteller and a fascinating character who drew myself and many others to him like a magnet, sitting in front of the Howling Gates. I like to think his memory smiles every time a story is told somewhere in MD.
    I remember AqlBeast, my first protector and a Seeker of Enlightenment. Someone who taught me a lot about this game, I like to think every time somebody around MD asks for help, Aql's memory is there to answer.
    I remember MRR who, most important of all, taught me how to do the silence spell! MRR, and MRP as well, also taught me many combat tips and tricks, and I like to think every time somebody reads and learns from their fight logs the memory of the MRs fraternity (not the alliance, exactly) is happy.
    I remember many many others who have come and gone, and of course those who have stayed too. I like to think every time someone makes a new friend in MD, our memories rejoice together.
  15. Like
    Yoshi got a reaction from Chewett in MD Birthday 2021 - Day 15 - The day of the past   
    In this post I remember both Awiiya and Handy Pockets, and the many seed-walks we had taken together. I learned about poetry, prose and perspective from Awiiya. From Kets I learned kindness and gentle quiet strength. Not just these things, but these in my mind were some of the biggest influences of Yoshi's character and I miss them terribly.
  16. Upvote
    Yoshi got a reaction from lashtal in MD Birthday 2021 - Day 15 - The day of the past   
    In this post I remember both Awiiya and Handy Pockets, and the many seed-walks we had taken together. I learned about poetry, prose and perspective from Awiiya. From Kets I learned kindness and gentle quiet strength. Not just these things, but these in my mind were some of the biggest influences of Yoshi's character and I miss them terribly.
  17. Upvote
    Yoshi got a reaction from Poppi Chullo in MD Birthday 2021 - Day 15 - The day of the past   
    In this post I remember both Awiiya and Handy Pockets, and the many seed-walks we had taken together. I learned about poetry, prose and perspective from Awiiya. From Kets I learned kindness and gentle quiet strength. Not just these things, but these in my mind were some of the biggest influences of Yoshi's character and I miss them terribly.
  18. Upvote
    Yoshi got a reaction from Pipstickz in MD Birthday 2021 - Day 15 - The day of the past   
    In this post I remember both Awiiya and Handy Pockets, and the many seed-walks we had taken together. I learned about poetry, prose and perspective from Awiiya. From Kets I learned kindness and gentle quiet strength. Not just these things, but these in my mind were some of the biggest influences of Yoshi's character and I miss them terribly.
  19. Like
    Yoshi reacted to Esmaralda in MD Birthday 2021 - Day 15 - The day of the past   
    I remember Amoran K Kol, then one that welcomed me to this land, intrigued me with hidden secrets, lore and history, and showed me the light of the moon. I miss her every day and hope that one day I shall speak with her again under the mighty tree of Loreroot, or in the bowels of its beautiful twin in Necrovion.  
  20. Like
    Yoshi got a reaction from Aelis in MD Birthday 2021 - Day 15 - The day of the past   
    In this post I remember both Awiiya and Handy Pockets, and the many seed-walks we had taken together. I learned about poetry, prose and perspective from Awiiya. From Kets I learned kindness and gentle quiet strength. Not just these things, but these in my mind were some of the biggest influences of Yoshi's character and I miss them terribly.
  21. Upvote
    Yoshi reacted to Chewett in MD Birthday 2021 - Day 15 - The day of the past   
    In this post I remember the troublesome dst, a good bughunter and an even better friend. Be well wherever you are!
    (Oh and come back and sort out your alliance, you have let riff-raff into it ) 
  22. Like
    Yoshi reacted to Chewett in MD Birthday 2021 - Day 15 - The day of the past   
    In this post I remember Cutler, he inspired me to try new things in MD and together we crafted the first and only piece of banned MDScript
    May he rest well.
  23. Upvote
    Yoshi reacted to Chewett in MD Birthday 2021 - Day 15 - The day of the past   
    Today is a little different and a more sombre affair with us remembering those friends who have passed through MD. The joy we shared with them while they were here will never be forgotten. You are invited to write something about a player who is not with us to remember them.
     
    Either someone who temporarily not with us, or more permanently, you are welcome to share a memory or even just their name today, we wish them all well.
     
    MagicDuel is nothing without the players, and we have enjoyed meeting each and every one of you.
  24. Like
    Yoshi reacted to Demonic God in The mason's puzzle   
    A bit late... o well. I'm not even sure why I made this, since most contestant drew their own thing xD. This is a tool to visualize what you made, and the scores you get... provided that it doesn't throw an error.
    For those that likes tinkering around, this might be fun for you to poke around with
    from graphics import * BORDER_THICKNESS = 3 SQUARE_THICKNESS = 50 SHAPES = { 'T_SHAPE':{ frozenset({(0,0,0),(0,1,0),(0,2,0),(0,1,1)}), frozenset({(0,0,0),(0,0,1),(0,0,2),(0,1,1)}), frozenset({(0,0,1),(0,1,1),(0,2,1),(0,1,0)}), frozenset({(0,1,0),(0,1,1),(0,1,2),(0,0,1)}) }, 'L_SHAPE':{ frozenset({(0,0,0),(0,1,0),(0,2,0),(0,0,1)}), frozenset({(0,0,0),(0,1,0),(0,2,0),(0,2,1)}), frozenset({(0,0,0),(0,0,1),(0,0,2),(0,1,0)}), frozenset({(0,0,0),(0,0,1),(0,0,2),(0,1,2)}), frozenset({(0,0,1),(0,1,1),(0,2,1),(0,0,0)}), frozenset({(0,0,1),(0,1,1),(0,2,1),(0,2,0)}), frozenset({(0,1,0),(0,1,1),(0,1,2),(0,0,0)}), frozenset({(0,1,0),(0,1,1),(0,1,2),(0,0,2)}) }, 'Z_SHAPE':{ frozenset({(0,0,0),(0,1,0),(0,1,1),(0,2,1)}), frozenset({(0,0,1),(0,1,1),(0,1,0),(0,2,0)}), frozenset({(0,0,0),(0,0,1),(0,1,1),(0,1,2)}), frozenset({(0,1,0),(0,1,1),(0,0,1),(0,0,2)}) }, 'I_SHAPE':{ frozenset({(0,0,0),(0,1,0)}), frozenset({(0,0,0),(0,0,1)}) }, 'DOT_SHAPE':{ frozenset({(0,0,0)}) } } POINTS = { 'Z_SHAPE': 4, 'T_SHAPE': 3, 'L_SHAPE': 3, 'I_SHAPE': 1, 'DOT_SHAPE': 0 } COLORS = { 'Z_SHAPE': 'red', 'T_SHAPE': 'green', 'L_SHAPE': 'blue', 'I_SHAPE': 'purple', 'DOT_SHAPE': 'yellow', 'BORDER': 'black' } def rotateFlat(shape): o = [] #re-order detect = [max(x) for x in [*zip(*shape)]] if detect[0] == 0: return shape # already flat elif detect[1] == 0: o = [1,0,2] elif detect[2] == 0: o = [2,1,0] else: raise Exception('Nonrotatable shape') return {(x[o[0]],x[o[1]],x[o[2]]) for x in shape} def getSimplifiedShape(index, matrix): tiles = [] for x,surface in enumerate(matrix): for y,line in enumerate(surface): for z,point in enumerate(line): if point == index: tiles.append([x,y,z]) simplifier = [min(x) for x in [*zip(*tiles)]] #Transpose to find min x y z simplified_shape = {(tile[0] - simplifier[0], tile[1] - simplifier[1], tile[2] - simplifier[2]) for tile in tiles} simplified_shape = rotateFlat(simplified_shape) return simplified_shape def getShape(index, matrix): simplified_shape = getSimplifiedShape(index, matrix) for SHAPE in SHAPES: if simplified_shape in SHAPES[SHAPE]: return SHAPE else: print(f'Cannot find shape {simplified_shape}') raise Exception() def getColor(matrix, layer, x, y): if isBorder(x,y): return COLORS['BORDER'] elif isInnerBorder(x,y): if _isInnerBorder(x) and not _isInnerBorder(y): x, y = getIndex(x,y) index_1 = matrix[layer][y][x-1] index_2 = matrix[layer][y][x] elif _isInnerBorder(y) and not _isInnerBorder(x): x, y = getIndex(x,y) index_1 = matrix[layer][y-1][x] index_2 = matrix[layer][y][x] else: return COLORS['BORDER'] if index_1 == index_2: shape = getShape(index_1, matrix) return COLORS[shape] else: return COLORS['BORDER'] else: x, y = getIndex(x,y) index = matrix[layer][y][x] shape = getShape(index, matrix) return COLORS[shape] def draw(matrix, offset_x = 30, offset_y = 30): size = BORDER_THICKNESS * 9 + SQUARE_THICKNESS * 8 window = GraphWin(width = size * 3 + offset_x * 4, height = size + offset_y * 2 + 40) indexSet = set() score = 0 for surface in matrix: for line in surface: for index in line: if index in indexSet: continue else: indexSet.add(index) score += POINTS[getShape(index, matrix)] message = Text(Point(window.getWidth() / 2 - 50, window.getHeight() - 40), f'Score: {score}') message.setTextColor('black') message.setSize(20) message.draw(window) for layer in range(3): for y in range(size): x = 0 while x < size: color = getColor(matrix, layer, x, y) point_a = Point(x + offset_x * (layer + 1) + layer * size, y + offset_y) if color != COLORS['BORDER']: if _isInnerBorder(x): length = BORDER_THICKNESS else: length = SQUARE_THICKNESS elif _isBorder(y): length = size elif _isInnerBorder(x) or _isBorder(x): length = BORDER_THICKNESS else: length = SQUARE_THICKNESS point_b = Point(point_a.getX() + length , point_a.getY()) x += length line = Line(point_a, point_b) line.setFill(color) line.draw(window) def _isBorder(x): return x < BORDER_THICKNESS or x >= ((BORDER_THICKNESS + SQUARE_THICKNESS) * 8) def isBorder(x, y): return _isBorder(x) or _isBorder(y) def _isInnerBorder(x): if _isBorder(x): return False while x >= BORDER_THICKNESS + SQUARE_THICKNESS: x -= BORDER_THICKNESS + SQUARE_THICKNESS if _isBorder(x): return True return False def isInnerBorder(x,y): if isBorder(x,y): return False return _isInnerBorder(x) or _isInnerBorder(y) def getIndex(x,y): return (x//(BORDER_THICKNESS + SQUARE_THICKNESS), y//(BORDER_THICKNESS + SQUARE_THICKNESS)) testArr = [ [ [0, 0, 1, 1, 1, 2, 2, 2], [3, 0, 0, 1, 4, 13, 14, 2], [3, 17, 18, 4, 4, 21, 22, 23], [24, 25, 26, 27, 4, 29, 30, 31], [32, 33, 34, 35, 36, 37, 38, 39], [40, 41, 42, 43, 44, 45, 46, 47], [48, 49, 50, 51, 52, 53, 54, 55], [56, 57, 58, 59, 60, 61, 62, 63] ], [ [64, 65, 66, 67, 68, 69, 70, 71], [72, 73, 74, 75, 76, 77, 78, 79], [80, 81, 82, 83, 84, 85, 86, 87], [88, 89, 90, 91, 92, 93, 94, 95], [96, 97, 98, 99, 100, 101, 102, 103], [104, 105, 106, 107, 108, 109, 110, 111], [112, 113, 114, 115, 116, 117, 118, 119], [120, 121, 122, 123, 124, 125, 126, 127] ], [ [128, 129, 130, 131, 132, 133, 134, 135], [136, 137, 138, 139, 140, 141, 142, 143], [144, 145, 146, 147, 148, 149, 150, 151], [152, 153, 154, 155, 156, 157, 158, 159], [160, 161, 162, 163, 164, 165, 166, 167], [168, 169, 170, 171, 172, 173, 174, 175], [176, 177, 178, 179, 180, 181, 182, 183], [184, 185, 186, 187, 188, 189, 190, 191] ] ] # draw(testArr) f = open("blocks.txt", "r", encoding="utf-8") matrix = [] layer = [] for line in f: line.replace(';',' ').replace(',',' ') data = [int(x) for x in line.split()] if len(data) == 0: continue assert len(data) == 8 layer.append(data) if len(layer) == 8: matrix.append(layer) layer = [] f.close() draw(matrix) input("Enter any key to quit.") You'd need to have python + graphics.py installed. Make a text file, name it "blocks.txt", and it *should* work.
    Here's an example of how "blocks.txt" should look like
    0 0 1 1 1 2 2 2 3 0 0 1 4 13 14 2 3 17 18 4 4 21 22 23 24 25 26 27 4 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 If you don't get any of this... well, it's just a tool ~~that I made after Yoshi submitted numbers~~ that is kinda used to grade stuff.
    I'll be making the grading script for the rock-paper-scissor game later, for those who wants to poke around with that too
  25. Upvote
    Yoshi got a reaction from Pipstickz in Of Memery and Schemery   
×
×
  • Create New...