Thread: Battleship game
View Single Post
Old
reuben2011
Senior Member
 
reuben2011's Avatar
 
Status: Offline
Posts: 489
Join Date: Sep 2009
Location: Hawaii
Default 05-25-2011, 04:14 PM

How about this: Click the ship to select it. Then the ship gets placed at (1,1) on the grid and you use the "when a key is pressed" to make the ship move one tile at a time. You're going to need to keep counters and use alot of if/else statements to make sure the ship is in bounds. I would rather use coordinates to keep track of the position rather than testing for proximity. Then you can have <SPACE> rotate the ship. If the ship can be placed, color it green; if it can't be placed, color the ship red. Then have the user press <ENTER> to have the ship go to it's final position (only if the ship is green.)


Projects
-Escape the Kitchen
-That ninja animation
-Hill Collision

Upcoming Projects
-Some penguin adventure game?
   
Reply With Quote