Ameba Ownd

アプリで簡単、無料ホームページ作成

Sokoban game source code

2022.01.19 02:49




















The player can move orthogonally - up, down, left, and right - and there are a few things to consider:. And that's literally it.


I also coded one more thing in that's not part of the original game, but it made sense to me:. When the player pushes a block that's next to other blocks, all the blocks will move until it collides with a wall.


In order to do this I just need to know the entities adjacent to the player, and the entities adjacent to a block if a player is pushing a block. If a player is pushing multiple blocks, I'll have to recursively count how many there are. Therefore, the first thing we need to do any time a change happens is find the player's current coordinates, and what type of entity is above, below, to the left, and to the right of them. Now that you have the player and adjacent coordinates, every action will be a move action.


If the player is trying to move through a traversible cell empty or void , just move the player. I am the judge on that. Level 2 was the exact copy of Infinity level or Aerie level 10 rotated degrees and horizontally mirrored , and level 3 and 12 the remodels with practically the same solution as originals.


The actual author of these levels has resubmited the collection, with these plagiat levels removed. Levels 13 to 17 are all remodels from the collection Atroxija level The author of the original, from which these remodels were made, has labeled them as rem or remodels. Passion Fruit. Feel free to comment about this and other level sets at: thoms yahoo. Have fun! It's intented to the fanatics of Sokoban. This set contains 3 levels "6boxes", 7 levels "7boxes" and 10 levels "8boxes".


Some of them aren't the greatest, hence the name, "Quagmire". Level 43 is a harder? Comments are always appreciated.


There are some recurring themes throughout the levels, especially my recent infatuation with nearly solved layouts. Several years in the making, with lots of breaks. My fascination with patterns and symmetry continues, combined with a lot of nearly-solved initial states. Hope you enjoy. Level 11 is a remodel from Labyrinth of Agony collection level Level 16 is a remodel from Labyrinth of Agony collection level 9.


Additional edit, Level 11 correctly oriented. Red mini. Level 2 and 3 are remodeled versions of Level 44 and 41 from the MasterHead-levelset. Level 26 is a remodeled version of a Sasquatch-Level by David W. Level 39 is a remodeled version of a level by Sven Egevad. Enjoy, have fun and keep thinking like a sokoban. Levels 1 to 5 are remodeled versions from levels of the kevinlevelset created by Kevin B. Level 27 and 28 are two remodeled versions of a puzzle originally created by Dries DeClerq.


Level 31 to 33 are remodeled versions from levels of the Vlevelset created by Shaggath. All levels have been tested and are solvable. Level 7 is a remodeled version of Level 2 from the Blazz2-levelset, created by Blaz Nikolic. Level 18 is a variation of Level 20 from the Svenlevelset, created by Sven Egevad. Level 31 and 32 are variations of Level 1 from the MulhollandD-levelset, created by Shaggath. Level 42 is a variation from the svblevel from Serg Belyaev.


Level 32 is a remodeled version of my own level 67 from 'Revenge Collection 02' which was also remodeled by Jordi Domenech. This collection is copyright by Marcus Hof. This collection contains just small levels, except 27 which is based on a 'Chuchubi'-level by Eric F. Level 55 is a remodeled version of 'Atlas08'-level 69, originally created by Eric F.


Level 64 is a variation of 'Aruba08'-level 3, originally created by Eric F. Levels 1 and 2 are based on level 3 from the Soloban-levelset originally created by Francois Marques. Level 34 is based on level 69 from the SokEvo-levelset created by Lee J. Level 8 is a variation of 39 from the MagicSokoban-levelset by Jordi Domenech.


Level 9 is a remodeled version of my own 21 from RevengeCollcetion Level 18 is based on the level 'Sokogravity1' by Dries DeClerq. Level 8 is based on level SE by Sven Egevad. Level 35 is a variation of MicrobanV level 2 from the unofficial release orginally created by David W. Level 48 is a variation of level Kevin created by Kevin B.


Level 8 is a remodeled version of level Kevin created by Kevin B. Level 31 is a remodeled version of level 4 from the dh1-levelset by David Holland.


Level 8 is a variation of level 7 from the SasquatchX-levelset by David W. It is the last 'RevengeXX'-collection. Thank you for playing. I hope you had fun playing and solving the puzzles.


Enjoy, have fun and keep thinking as a sokoban. The difficulty ranges from easy to 'a little bit tricky'. But how difficult they are for you? That is what you must decide for yourself. But don't worry if you get stuck - they are all solvable and not that hard that it would take hours to find a solution. Have fun and keep thinking like a Sokoban. These levels are more tricky than those in the first and second part.


They are all solvable. This set is totally handmade. Greetings from good old Germany. Comments from other authors are welcome. All levels are handmade and solvable. Level 20 of this collection was inspired by the 'dh1'-level 7 from David Holland.


Level 45 and 46 were inspired by Microban-levels from David W. For sure they are all solvable. Level 13 is a remodel from a level by Kevin B. All levels have been tested and they are all solvable. Level 42 and 43 were inspired by levels from Thomas Reinke.


Some Levels 1,3 and 10 are deviously difficult, but ARE possible. Roger Delaporte. Scott Lindhurst describes them as generally of just the right difficulty to be fun: not too easy, but usually not so hard that you get frustrated.


Collection supervisor: York Shen general supervisor and author of remodeled levels. Original Sasquatch levels by David W. Skinner's levels. They are published with David W. Skinner's permission. Thirtyone of these levels explore some form of design symmetry. It is interesting to me at least to solve levels in which sections are reversed or rotated.


Each transformation often suggests different approaches to the solution. However, sometimes the confusion created requires that each section be solved from scratch.


Sometimes, I find levels in my earlier sets which I would do differently today. Included here are improved versions of two previous levels. As always, I've tried to explore a wide variety of puzzle types. Sasquatch IX 16 is an improved version of Sasquatch This set contains several puzzles which exceed the 31x18 size limit of my previous sets.


Forty of these levels involve some form of symmetry. There is also a sequence of levels where I explore the possibilities of working within squares of various sizes. This set contains several puzzles which exceed the 31x18 size limit of my first sets. I could fix it, but at the cost of speed and memory.


On this particular puzzle, the branch factor for the different search directions were clearly quite different, as the forward search only did 29 moves, while the reverse search did 47 moves. Although my code doesn't print out the actual final board, it would be easy enough to compute from the move list.


Push-optimised, prunes breadth-first search space to reachable pushable-to-live boxes. Fairly fast, but often produces same-push-tally but longer results than move-optimised. Note that a full solution in LURD format would show as 48 moves, as opposed to the move-optimal solutions of other entries of 34 moves, but both are 14 pushes.


This searches for a solution, without trying for the push-optimal one. The player moves between the pushes, however, are minimized. This was originally inspired by PicoLisp's solution. Modified to use a priority queue as mentioned on the Sokoban wiki for the main breadth first search on pushes but just a plain queue for the move bfs. This uses personal libraries. This puzzle can be solved using the following concepts. Practice using these concepts and improve your skills. Line 1: width height boxCount , the width and height of the map and the number of boxes.


Line 1: pusherX pusherY , the position of your unit. A higher resolution is required to access the IDE. Employers: discover CodinGame for tech hiring.