-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from ejatgit/My-Local-Cpp
Checking my branch work for the night
- Loading branch information
Showing
6 changed files
with
104 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,96 @@ | ||
#include"GlobalVariables.h" | ||
#include "mFunctions.h" | ||
//Attribute VB_Name = "mFunctions" | ||
//Option Explicit | ||
// | ||
//Function offsetRowBy(ByVal iValue As Integer) As Integer | ||
// | ||
//If 1 <= iValue And iValue <= 3 Then | ||
// offsetRowBy = 1 | ||
//ElseIf 7 <= iValue And iValue <= 9 Then | ||
// offsetRowBy = -1 | ||
//Else | ||
// offsetRowBy = 0 | ||
//End If | ||
// | ||
//End Function | ||
// | ||
//Function offsetColumnBy(ByVal iValue As Integer) As Integer | ||
// | ||
//If iValue = 3 Or iValue = 6 Or iValue = 9 Then | ||
// offsetColumnBy = 1 | ||
//ElseIf iValue = 1 Or iValue = 4 Or iValue = 7 Then | ||
// offsetColumnBy = -1 | ||
//Else | ||
// offsetColumnBy = 0 | ||
//End If | ||
// | ||
//End Function | ||
// | ||
//Function interceptorRowOffset(ByVal iValue As Integer) As Integer | ||
//Dim iTest As Integer | ||
// | ||
//iTest = cActivePlayer.Row - iValue | ||
// | ||
//If iTest > 0 Then | ||
// interceptorRowOffset = 1 | ||
//ElseIf iTest < 0 Then | ||
// interceptorRowOffset = -1 | ||
//Else | ||
// interceptorRowOffset = 0 | ||
//End If | ||
// | ||
//End Function | ||
// | ||
//Function interceptorColumnOffset(ByVal iValue As Integer) As Integer | ||
//Dim iTest As Integer | ||
int offsetRowBy(int iValue) { | ||
//Function offsetRowBy(ByVal iValue As Integer) As Integer | ||
// | ||
//If 1 <= iValue And iValue <= 3 Then | ||
// offsetRowBy = 1 | ||
//ElseIf 7 <= iValue And iValue <= 9 Then | ||
// offsetRowBy = -1 | ||
//Else | ||
// offsetRowBy = 0 | ||
//End If | ||
// | ||
//End Function | ||
} | ||
// | ||
//iTest = cActivePlayer.Column - iValue | ||
int offsetColumnBy(int iValue) { | ||
//Function offsetColumnBy(ByVal iValue As Integer) As Integer | ||
// | ||
//If iValue = 3 Or iValue = 6 Or iValue = 9 Then | ||
// offsetColumnBy = 1 | ||
//ElseIf iValue = 1 Or iValue = 4 Or iValue = 7 Then | ||
// offsetColumnBy = -1 | ||
//Else | ||
// offsetColumnBy = 0 | ||
//End If | ||
// | ||
//End Function | ||
} | ||
// | ||
//If iTest > 0 Then | ||
// interceptorColumnOffset = 1 | ||
//ElseIf iTest < 0 Then | ||
// interceptorColumnOffset = -1 | ||
//Else | ||
// interceptorColumnOffset = 0 | ||
//End If | ||
int interceptorRowOffset(int iValue) { | ||
//Function interceptorRowOffset(ByVal iValue As Integer) As Integer | ||
//Dim iTest As Integer | ||
// | ||
//iTest = cActivePlayer.Row - iValue | ||
// | ||
//If iTest > 0 Then | ||
// interceptorRowOffset = 1 | ||
//ElseIf iTest < 0 Then | ||
// interceptorRowOffset = -1 | ||
//Else | ||
// interceptorRowOffset = 0 | ||
//End If | ||
// | ||
//End Function | ||
} | ||
// | ||
//End Function | ||
int interceptorColumnOffset(Int iValue) { | ||
//Function interceptorColumnOffset(ByVal iValue As Integer) As Integer | ||
//Dim iTest As Integer | ||
// | ||
//iTest = cActivePlayer.Column - iValue | ||
// | ||
//If iTest > 0 Then | ||
// interceptorColumnOffset = 1 | ||
//ElseIf iTest < 0 Then | ||
// interceptorColumnOffset = -1 | ||
//Else | ||
// interceptorColumnOffset = 0 | ||
//End If | ||
// | ||
//End Function | ||
} | ||
// | ||
bool CheckInterceptorsAlive{ | ||
bool CheckInterceptorsAlive(){ | ||
//Function CheckInterceptorsAlive() As Boolean | ||
//Dim cNowinterceptor As cInterceptor | ||
cIneterceptor cNowInterceptor; | ||
// | ||
//For Each cNowinterceptor In interceptorCollection | ||
for(do something here)left off here | ||
for (size_t i = 0; i < myVector.size(); ++i) | ||
for (int i = 0; i < interceptorCollection.count,++i)//left off here | ||
{ | ||
cNowInterceptor = interceptorCollection[i]; | ||
// If cNowinterceptor.Alive Then | ||
// CheckInterceptorsAlive = True | ||
// Exit For | ||
if (cNowInterceptor.Alive) { | ||
// CheckInterceptorsAlive = True | ||
return true; | ||
// Exit For | ||
break; | ||
} | ||
// Else | ||
// CheckInterceptorsAlive = False | ||
// End If | ||
else | ||
{ | ||
// CheckInterceptorsAlive = False | ||
return false; | ||
// End If | ||
} | ||
//Next cNowinterceptor | ||
// | ||
} | ||
//End Function | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#pragma once | ||
|
||
#ifndef mFunctions_H | ||
#define mFunctions_H | ||
int offsetRowBy(int iValue); | ||
int offsetColumnBy(int iValue); | ||
int interceptorRowOffset(int iValue); | ||
int interceptorColumnOffset(Int iValue); | ||
bool CheckInterceptorsAlive(); | ||
#endif | ||
|