Laura Delaney / Mbed 2 deprecated Ldelaney17_frdm_Final_Project

Dependencies:   DmTouch_UniGraphic UniGraphic-forLdelaney17FinalProject mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers game.h Source File

game.h

00001 #ifndef GAME_H
00002 #define GAME_H
00003 #include "mbed.h"
00004 #include <vector>
00005 #include "lcd_prompts.h"
00006 #include <sstream>
00007 #include <algorithm> //reverse
00008 #include "Song.h"
00009 
00010 extern int num_players;
00011 extern int current_player;
00012 extern int current_player_index;
00013 extern Timer current_clock;
00014 extern bool clock_running;
00015 extern vector<float> player_timers;
00016 extern vector<int> player_order;
00017 extern float bonus_time;
00018 extern int phase_number;
00019 extern int step_number; //0 = set turn order, 1 = auction power plants, 2 = buy resources, 4 - building, 5 = beauracracy
00020 const float time_after_warning_sound = 15; //after 15 seconds of a turn, play jeopardy
00021 extern Timeout time_after_warning;
00022 const float time_before_warning_sound = 60; //when the timer has 60 seconds left, play a scale
00023 extern Timeout time_before_warning;
00024 extern Song * jeopardy, * scale, * beep;
00025 extern Serial pc;
00026 
00027 void game_setup();
00028 void init_num_players();
00029 void set_player_order();
00030 void set_start_time(); //right now this has hardcoded options
00031 void set_bonus_time(); //right now this also has hardcoded options
00032 
00033 void next_step();
00034 void reverse_player_order();
00035 
00036 void display_timer();
00037 void update_clock();
00038 void update_timer();
00039 void next_player();
00040 void start_timer(int player_num);
00041 void pause_timer();
00042 void unpause_timer();
00043 void toggle_pause();
00044 
00045 
00046 
00047 
00048 
00049 
00050 #endif