The grid that i implemented last week wasn't useful for my idea, and i found a tutorial webpage of how to build a minesweeper game in Flash CC. That tutorial helped me to get started.
I created a new file to start over. At first, I used the small part of the code that draws grid, and hover effect on the grid.
Here is the code for the grid:
Then, i created another child class for grid and in that class. In that class, its basically tell how the grid should behave in the game. So i add EventListener for when hover over the grid the gold then the gold appears, when hover out the grid (square) it disappear and when click on the box it place the gold.
After that, i can successfully hover over and out on each box and also place gold on it. Then, i was planning to add mountains surrounded square, however, i was having so much trouble when implementing it. Due to the short limit of duration, i changed my plan.
First, i have to make another grid for player 2 -> place only one gold on each grid -> game start -> click on box and check if gold is here or not -> player1/2 wins
I'm hoping i can get these tasks done by Monday.
First, i have to make another grid for player 2 -> place only one gold on each grid -> game start -> click on box and check if gold is here or not -> player1/2 wins
I'm hoping i can get these tasks done by Monday.
No comments:
Post a Comment