Skip to content

DonghaoXu/BoardGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BoardGame

A very simple board game. This is an exercise from http://www.cplusplus.com/forum/articles/12974/.

Dungeon Crawl

Make a program that outputs a simple grid based gameboard to the screen using either numbers or characters. i.e.

. . . . . . . . . .

.G. . . . . . . .

. . . . . .T. . .

. . . . . . . . . .

. . . .T. . . . .

. . . . . .T. . .

. . . . . . . . .X

or

0 0 0 0 0 0 0 0 0 0

0 5 0 0 6 0 0 0 0 0

0 0 0 0 0 0 7 0 0 0

0 0 0 0 0 0 0 0 0 0

0 0 0 7 0 0 0 0 0 0

0 0 0 0 0 0 7 0 0 0

0 0 0 0 0 0 0 0 0 4

Allow the user (marked by G in the example) to move either up, down, left, or right each turn. If the player steps on a trap then they lose. If the make it to the treasure 'X' then they win.

★★ Add enemies that move randomly in any direction once per turn. (enemies just like traps cause the player to lose if touched)

HINT: Don't let the player move off the gameboard! You program will crash if they move off the top or bottom of the board! (the same holds true for enemies)

About

A very simple board game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages