|
@@ -1,13 +1,31 @@
|
|
|
#include "playerCard.h"
|
|
|
-PlayerCard::PlayerCard(std::string name){
|
|
|
+PlayerCard::PlayerCard(std::string name)
|
|
|
+{
|
|
|
// make 12 boxes for each colored row (not the white ones)
|
|
|
- for(int j = 0; j<white1; j++){
|
|
|
+ for(int j = 0; j<white1; j++)
|
|
|
+ {
|
|
|
std::vector<bool> empty;
|
|
|
rowColors.push_back(empty);
|
|
|
- for (int i = 0; i<CHECKBOXES; i++){
|
|
|
+ for (int i = 0; i<CHECKBOXES; i++)
|
|
|
+ {
|
|
|
rowColors[j].push_back(false);
|
|
|
}
|
|
|
}
|
|
|
+ // initialize player selection (this is player's current selected checkbox)
|
|
|
+ std::vector<int> t;
|
|
|
+ t.push_back(0);
|
|
|
+ selection.push_back(t);
|
|
|
+ t.push_back(0);
|
|
|
+ selection.push_back(t);
|
|
|
+ selection.push_back(t);
|
|
|
savedName = name;
|
|
|
penaltyCount = 0;
|
|
|
+}
|
|
|
+void PlayerCard::newSelection()
|
|
|
+{
|
|
|
+ selection[penalty][0] = 0;
|
|
|
+ selection[everyone][row] = -1;
|
|
|
+ selection[everyone][column] = -1;
|
|
|
+ selection[active][row] = -1;
|
|
|
+ selection[active][column] = -1;
|
|
|
}
|