Posts

Showing posts from November, 2012

LINKED LIST IMPLEMENTATION FOR GAME BATTLESHIP THROUGH C

LINKED LIST IMPLEMENTATION FOR GAME BATTLESHIP THROUGH C The game is played on four  grids , two for each player. The grids are typically square – usually 10×10 – and the individual squares in the grid are identified by letter and number. On one grid the player arranges ships and records the shots by the opponent. On the other grid the player records his/her own shots. Before play begins, each player secretly arranges their ships on their primary grid. Each ship occupies a number of consecutive squares on the grid, arranged either horizontally or vertically. The number of squares for each ship is determined by the type of the ship. The ships cannot overlap (i.e., only one ship can occupy any given square in the grid). The types and numbers of ships allowed are the same for each player. These may vary depending on the rules. REF:-  http://en.wikipedia.org/wiki/Battleship_(game) I have used Linked List For It's Implementation One Can Use Array too.....  _...

TIC-TAC-TOE THROUGH C

IMPLEMENTATION OF TIC-TAC-TOE THROUGH C :- From Wikipedia, the free encyclopedia. Tic-tac-toe, originally called noughts and crosses (and still known as this in Britain and Australia), Xs and Os (in Ireland) and X and 0 (in India) is a pencil-and-paper game for two players, X and O, who take turns marking the spaces in a 3×3 grid. The player who succeeds in placing three respective marks in a horizontal, vertical, or diagonal row wins the game. The following example game is won by the first player, X: Players soon discover that best play from both parties leads to a draw (often referred to as cat or cat's game). Hence, tic-tac-toe is most often played by young children. The friendliness of tic-tac-toe games makes them ideal as a pedagogical tool for teaching the concepts of good sportsmanship and the branch of artificial intelligence that deals with the searching of game trees. It is straightforward to write a computer program to play tic-tac-toe perfectly,...