CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 3 of 3

Thread: C++ Simple Game.

  1. #1
    Join Date
    May 2010

    Cool C++ Simple Game.

    It is required to create a simple two dimensional predator prey game
    The game is composed of the following:
    1) 2 dimensional grid of size 20*20 cells closed creatures are allowed to move outside the grid

    2) Predators whom move across the gird attempting to eat prey

    3) There are different types of predators snake , scorpions

    4) There are different types of preys bugs , ants , worms

    5) Snake can eat worms and bugs but cannot eat worms

    6) Scorpions can eat worms and ants

    7) If the prey survives for 3 moves it breeds , adding a new prey of the same type in the cells around it (either top , left , right or bottom), if there is no empty cell no breeding occurs

    8) The prey can move randomly up , down , left and right, if the neighboring cell in the selected direction is occupied, or would move the ant outside of the grid. Then it stays in the same location

    9) The predator can move a step and if there is a prey around it (left, right , top or button) of proper food he eats it ,

    10) The predator can starve and die if for 3 move it didn’t eat

    11) The predator can breed a new predator of the same type if it survives for 10 moves in the cells around it (either top , left , right or bottom), if there is no empty cell no breeding occurs

    12) During one turn … predetors move then eat breed (if possible) then preys move and preed if possible

    13) You should display this using chacters “S” for snake , ‘X’for scorpion , “B”for bugs, “A”for ants,”W”for worms

    14) You programs should request from the user the user for the snake move and the scorpion move , left, right, top or buttom

    15) Initialize the game with 1 snake, 1 scorpion, 30 ants, 30 worms and 30 bugs. There location in the grid are randomly selected

    Graphical user interface and uml diagrams are required.

  2. #2
    Join Date
    Sep 2001
    Québec, Canada

    Re: C++ Simple Game.

    That's quite interesting, but please, read this post regarding homework assignment:

    CodeGuru VB FAQ Visual Basic Frequently Asked Questions
    VB Code color Tool to color your VB code on CodeGuru
    Before you post Importants informations to know before posting

  3. #3
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003

    Re: C++ Simple Game.

    I assume this is required of you. You should probably get started then.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)