Skip to content

Commit

Permalink
Final Cleanup (#30)
Browse files Browse the repository at this point in the history
* Remove unnecessary window reference

* Remove excessive whitespace

* Disable warnings on compile

* Add run instructions

* Add the cool README
  • Loading branch information
drofp authored May 14, 2019
1 parent 9ad2fa4 commit fd4f3ec
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ run: clean all
./$(BIN)/$(EXECUTABLE)

$(BIN)/$(EXECUTABLE): $(SRC)/*.cc
$(CXX) $(CXX_FLAGS) -I$(INCLUDE) -L$(LIB) $^ -o $@ $(LIBRARIES)
$(CXX) $(CXX_FLAGS) -I$(INCLUDE) -L$(LIB) $^ -o $@ $(LIBRARIES) -w

clean:
-rm $(BIN)/*
25 changes: 22 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# RoadRun
*Obstacle avoidance game in C++ using object oriented design principles*
An obstacle avoidance game in C++ using object oriented design principles.

## Getting Started
> TODO
![](RoadRun_demo.gif)

## How to Run
Make sure [NCurses](https://invisible-island.net/ncurses/man/ncurses.3x.html) is [installed](https://www.cyberciti.biz/faq/linux-install-ncurses-library-headers-on-debian-ubuntu-centos-fedora/) with this commmand:
```
sudo apt-get install libncurses5-dev libncursesw5-dev
```
Compile and run with this command:
```
make run
```

## How to Play
- Select "Play Game" to start a new game
- Use left and right arrow keys to move your character: `^`
- Don't hit anything!

## Acknowledgements
- SJSU's CMPE 135 Class taught by professor [Ron Mak](http://www.cs.sjsu.edu/~mak/CMPE135/index.html) for inspiration for this project.
- All contributors
- Everyone who helped play test
Binary file added RoadRun_demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions include/game.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ class Game
int curr_high_score;
int curr_score;

void PrintGameFrame(WINDOW *game_win);
void PrintInfoFrame(WINDOW *info_win);
void PrintGameFrame();
void PrintInfoFrame();

void PrintPrepScreen();
void PrintEndScreen();
Expand Down
1 change: 0 additions & 1 deletion include/settings_item.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ enum class SettingsItem
kLudicrous
};


static const SettingsItem settings_item_list[] =
{
SettingsItem::kRegular,
Expand Down
8 changes: 4 additions & 4 deletions src/game.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ void Game::PlayGame()

UpdatePlayerLoc();

PrintGameFrame(game_win);
PrintInfoFrame(info_win);
PrintGameFrame();
PrintInfoFrame();
napms(1);
}

Expand All @@ -68,7 +68,7 @@ void Game::PlayGame()
endwin();
}

void Game::PrintGameFrame(WINDOW *game_win)
void Game::PrintGameFrame()
{
wclear(game_win);

Expand All @@ -80,7 +80,7 @@ void Game::PrintGameFrame(WINDOW *game_win)
wrefresh(game_win);
}

void Game::PrintInfoFrame(WINDOW *info_win)
void Game::PrintInfoFrame()
{
wclear(info_win);

Expand Down
1 change: 0 additions & 1 deletion src/settings_menu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ namespace roadrun
{
void SettingsMenu::RenderOptions(WINDOW *menu_win, int highlight)
{

mvwprintw(menu_win, 2, 4, "Choose a Difficulty");
char *choices[] = {
"Regular Mode",
Expand Down

0 comments on commit fd4f3ec

Please sign in to comment.