Skip to content

Commit

Permalink
- added C++ CGDK.
Browse files Browse the repository at this point in the history
  • Loading branch information
SladeThe committed Sep 8, 2014
0 parents commit 1de6121
Show file tree
Hide file tree
Showing 59 changed files with 7,356 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/wipe.bat
/UpgradeLog*.XML
/_UpgradeReport_Files
/cpp-cgdk.xcodeproj
/ipch
/cpp-cgdk*.ncb
/cpp-cgdk*.sdf
/cpp-cgdk*.suo
/cpp-cgdk*.vcproj.user
/cpp-cgdk*.vcproj.*.user
/cpp-cgdk*.vcxproj.user
/cpp-cgdk*.vcxproj.*.user
18 changes: 18 additions & 0 deletions MyStrategy.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include "MyStrategy.h"

#define PI 3.14159265358979323846
#define _USE_MATH_DEFINES

#include <cmath>
#include <cstdlib>

using namespace model;
using namespace std;

void MyStrategy::move(const Hockeyist& self, const World& world, const Game& game, Move& move) {
move.setSpeedUp(-1.0);
move.setTurn(PI);
move.setAction(STRIKE);
}

MyStrategy::MyStrategy() { }
15 changes: 15 additions & 0 deletions MyStrategy.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#pragma once

#ifndef _MY_STRATEGY_H_
#define _MY_STRATEGY_H_

#include "Strategy.h"

class MyStrategy : public Strategy {
public:
MyStrategy();

void move(const model::Hockeyist& self, const model::World& world, const model::Game& game, model::Move& move);
};

#endif
Loading

0 comments on commit 1de6121

Please sign in to comment.