| @@ -0,0 +1,91 @@ | ||
| using UnityEngine; | ||
| using UnityEngine.UI; | ||
| using System.Collections.Generic; | ||
| using System.Reflection; | ||
| using System.IO; | ||
| using System; | ||
| using AmazonAIBase; | ||
|
|
||
| public class GameManager : MonoBehaviour { | ||
|
|
||
| public GameInst GameInstance = new GameInst(); | ||
| int Width; | ||
| int Height; | ||
|
|
||
| // Use this for initialization | ||
| void Start () { | ||
| string[] aiLibs = Directory.GetFiles(@".\AI\", "*.dll"); | ||
| foreach (string path in aiLibs) { | ||
| Assembly asm = Assembly.LoadFrom(path); | ||
| Type[] types = asm.GetTypes(); | ||
| object instance = Activator.CreateInstance(types[0]); | ||
| AmazonAIBase.AIBase temp = (AmazonAIBase.AIBase)instance; | ||
| GameObject.Find("NameText").GetComponent<Text>().text = temp.StudentName; | ||
| } | ||
| } | ||
|
|
||
| // Update is called once per frame | ||
| void Update () { | ||
|
|
||
| } | ||
|
|
||
|
|
||
| void StartGame() { | ||
| List<List<int>> newBoard = new List<List<int>>(Width); | ||
| for(int y = 0; y < Height; ++y) | ||
| newBoard[y] = new List<int>(Height); | ||
| GameInstance.SetBoard(newBoard, Width, Height); | ||
| } | ||
|
|
||
| bool ActivateAI(Amazons.Player player) { | ||
| Amazons.Move move = player.AI.YourTurn(); | ||
| //GameInstance.Board | ||
| if(!CheckLine(player.Pawns[move.ID].Position, move.MoveTo) || | ||
| !CheckLine(move.MoveTo, move.ShootTo)) | ||
| return false; // ACTIVE PLAYER LOSES | ||
|
|
||
| player.Pawns[move.ID].Position = move.MoveTo; // Set pawn pos to correct pos | ||
| SetBoardPoint(player.Pawns[move.ID].Position, 0); // Set old pos to empty | ||
| SetBoardPoint(move.MoveTo, move.ID + player.ID); // Set new pos to id | ||
| SetBoardPoint(move.ShootTo, -1); // Set shoot pos to -1 | ||
|
|
||
| ActivateVisualMove(move); | ||
| return true; | ||
| } | ||
|
|
||
| void ActivateVisualMove(Amazons.Move move) { | ||
| // Activate game object, move squares, call event | ||
| } | ||
|
|
||
| bool CheckLine(Point start, Point end) { | ||
| if(((start.X - end.X) - (start.Y - end.Y)) == 0 && | ||
| CheckValidPoint(start) && CheckValidPoint(end)) { | ||
| int h = (end.X - start.X) > 0 ? 1 : (end.X - start.X) < 0 ? -1 : 0; | ||
| int v = (end.Y - start.Y) > 0 ? 1 : (end.Y - start.Y) < 0 ? -1 : 0; | ||
| int x = start.X; int y = start.Y; | ||
| while(x != end.X || y != end.Y) { | ||
| if(GameInstance.Board[x][y] != 0) | ||
| return false; | ||
| x += v; y += h; | ||
| } | ||
| return true; | ||
| } | ||
| return false; | ||
| } | ||
|
|
||
| bool CheckValidPoint(Point point) { | ||
| return (point.X < Width && point.X >= 0 && point.Y < Height && point.Y >= 0); | ||
| } | ||
|
|
||
| void SetBoardPoint(Point point, int type) { | ||
| GameInstance.Board[point.X][point.Y] = type; | ||
| } | ||
| } | ||
|
|
||
| public class GameInst : Amazons.Game { | ||
| public void SetBoard(List<List<int>> newBoard, int width, int height) { | ||
| Board = newBoard; | ||
| Height = height; | ||
| Width = width; | ||
| } | ||
| } |
| @@ -0,0 +1,14 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!11 &1 | ||
| AudioManager: | ||
| m_ObjectHideFlags: 0 | ||
| m_Volume: 1 | ||
| Rolloff Scale: 1 | ||
| Doppler Factor: 1 | ||
| Default Speaker Mode: 2 | ||
| m_SampleRate: 0 | ||
| m_DSPBufferSize: 0 | ||
| m_VirtualVoiceCount: 512 | ||
| m_RealVoiceCount: 32 | ||
| m_DisableAudio: 0 |
| @@ -0,0 +1,14 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!55 &1 | ||
| PhysicsManager: | ||
| m_ObjectHideFlags: 0 | ||
| m_Gravity: {x: 0, y: -9.81000042, z: 0} | ||
| m_DefaultMaterial: {fileID: 0} | ||
| m_BounceThreshold: 2 | ||
| m_SleepThreshold: .00499999989 | ||
| m_DefaultContactOffset: .00999999978 | ||
| m_SolverIterationCount: 6 | ||
| m_RaycastsHitTriggers: 1 | ||
| m_EnableAdaptiveForce: 0 | ||
| m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
| @@ -0,0 +1,7 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!1045 &1 | ||
| EditorBuildSettings: | ||
| m_ObjectHideFlags: 0 | ||
| serializedVersion: 2 | ||
| m_Scenes: [] |
| @@ -0,0 +1,13 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!159 &1 | ||
| EditorSettings: | ||
| m_ObjectHideFlags: 0 | ||
| serializedVersion: 3 | ||
| m_ExternalVersionControlSupport: Visible Meta Files | ||
| m_SerializationMode: 2 | ||
| m_WebSecurityEmulationEnabled: 0 | ||
| m_WebSecurityEmulationHostUrl: http://www.mydomain.com/mygame.unity3d | ||
| m_DefaultBehaviorMode: 1 | ||
| m_SpritePackerMode: 2 | ||
| m_SpritePackerPaddingPower: 1 |
| @@ -0,0 +1,29 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!30 &1 | ||
| GraphicsSettings: | ||
| m_ObjectHideFlags: 0 | ||
| serializedVersion: 3 | ||
| m_Deferred: | ||
| m_Mode: 1 | ||
| m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} | ||
| m_LegacyDeferred: | ||
| m_Mode: 1 | ||
| m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} | ||
| m_AlwaysIncludedShaders: | ||
| - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} | ||
| - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} | ||
| - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} | ||
| - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} | ||
| - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} | ||
| - {fileID: 10782, guid: 0000000000000000f000000000000000, type: 0} | ||
| m_PreloadedShaders: [] | ||
| m_LightmapStripping: 0 | ||
| m_LightmapKeepPlain: 1 | ||
| m_LightmapKeepDirCombined: 1 | ||
| m_LightmapKeepDirSeparate: 1 | ||
| m_LightmapKeepDynamic: 1 | ||
| m_FogStripping: 0 | ||
| m_FogKeepLinear: 1 | ||
| m_FogKeepExp: 1 | ||
| m_FogKeepExp2: 1 |
| @@ -0,0 +1,295 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!13 &1 | ||
| InputManager: | ||
| m_ObjectHideFlags: 0 | ||
| serializedVersion: 2 | ||
| m_Axes: | ||
| - serializedVersion: 3 | ||
| m_Name: Horizontal | ||
| descriptiveName: | ||
| descriptiveNegativeName: | ||
| negativeButton: left | ||
| positiveButton: right | ||
| altNegativeButton: a | ||
| altPositiveButton: d | ||
| gravity: 3 | ||
| dead: .00100000005 | ||
| sensitivity: 3 | ||
| snap: 1 | ||
| invert: 0 | ||
| type: 0 | ||
| axis: 0 | ||
| joyNum: 0 | ||
| - serializedVersion: 3 | ||
| m_Name: Vertical | ||
| descriptiveName: | ||
| descriptiveNegativeName: | ||
| negativeButton: down | ||
| positiveButton: up | ||
| altNegativeButton: s | ||
| altPositiveButton: w | ||
| gravity: 3 | ||
| dead: .00100000005 | ||
| sensitivity: 3 | ||
| snap: 1 | ||
| invert: 0 | ||
| type: 0 | ||
| axis: 0 | ||
| joyNum: 0 | ||
| - serializedVersion: 3 | ||
| m_Name: Fire1 | ||
| descriptiveName: | ||
| descriptiveNegativeName: | ||
| negativeButton: | ||
| positiveButton: left ctrl | ||
| altNegativeButton: | ||
| altPositiveButton: mouse 0 | ||
| gravity: 1000 | ||
| dead: .00100000005 | ||
| sensitivity: 1000 | ||
| snap: 0 | ||
| invert: 0 | ||
| type: 0 | ||
| axis: 0 | ||
| joyNum: 0 | ||
| - serializedVersion: 3 | ||
| m_Name: Fire2 | ||
| descriptiveName: | ||
| descriptiveNegativeName: | ||
| negativeButton: | ||
| positiveButton: left alt | ||
| altNegativeButton: | ||
| altPositiveButton: mouse 1 | ||
| gravity: 1000 | ||
| dead: .00100000005 | ||
| sensitivity: 1000 | ||
| snap: 0 | ||
| invert: 0 | ||
| type: 0 | ||
| axis: 0 | ||
| joyNum: 0 | ||
| - serializedVersion: 3 | ||
| m_Name: Fire3 | ||
| descriptiveName: | ||
| descriptiveNegativeName: | ||
| negativeButton: | ||
| positiveButton: left shift | ||
| altNegativeButton: | ||
| altPositiveButton: mouse 2 | ||
| gravity: 1000 | ||
| dead: .00100000005 | ||
| sensitivity: 1000 | ||
| snap: 0 | ||
| invert: 0 | ||
| type: 0 | ||
| axis: 0 | ||
| joyNum: 0 | ||
| - serializedVersion: 3 | ||
| m_Name: Jump | ||
| descriptiveName: | ||
| descriptiveNegativeName: | ||
| negativeButton: | ||
| positiveButton: space | ||
| altNegativeButton: | ||
| altPositiveButton: | ||
| gravity: 1000 | ||
| dead: .00100000005 | ||
| sensitivity: 1000 | ||
| snap: 0 | ||
| invert: 0 | ||
| type: 0 | ||
| axis: 0 | ||
| joyNum: 0 | ||
| - serializedVersion: 3 | ||
| m_Name: Mouse X | ||
| descriptiveName: | ||
| descriptiveNegativeName: | ||
| negativeButton: | ||
| positiveButton: | ||
| altNegativeButton: | ||
| altPositiveButton: | ||
| gravity: 0 | ||
| dead: 0 | ||
| sensitivity: .100000001 | ||
| snap: 0 | ||
| invert: 0 | ||
| type: 1 | ||
| axis: 0 | ||
| joyNum: 0 | ||
| - serializedVersion: 3 | ||
| m_Name: Mouse Y | ||
| descriptiveName: | ||
| descriptiveNegativeName: | ||
| negativeButton: | ||
| positiveButton: | ||
| altNegativeButton: | ||
| altPositiveButton: | ||
| gravity: 0 | ||
| dead: 0 | ||
| sensitivity: .100000001 | ||
| snap: 0 | ||
| invert: 0 | ||
| type: 1 | ||
| axis: 1 | ||
| joyNum: 0 | ||
| - serializedVersion: 3 | ||
| m_Name: Mouse ScrollWheel | ||
| descriptiveName: | ||
| descriptiveNegativeName: | ||
| negativeButton: | ||
| positiveButton: | ||
| altNegativeButton: | ||
| altPositiveButton: | ||
| gravity: 0 | ||
| dead: 0 | ||
| sensitivity: .100000001 | ||
| snap: 0 | ||
| invert: 0 | ||
| type: 1 | ||
| axis: 2 | ||
| joyNum: 0 | ||
| - serializedVersion: 3 | ||
| m_Name: Horizontal | ||
| descriptiveName: | ||
| descriptiveNegativeName: | ||
| negativeButton: | ||
| positiveButton: | ||
| altNegativeButton: | ||
| altPositiveButton: | ||
| gravity: 0 | ||
| dead: .189999998 | ||
| sensitivity: 1 | ||
| snap: 0 | ||
| invert: 0 | ||
| type: 2 | ||
| axis: 0 | ||
| joyNum: 0 | ||
| - serializedVersion: 3 | ||
| m_Name: Vertical | ||
| descriptiveName: | ||
| descriptiveNegativeName: | ||
| negativeButton: | ||
| positiveButton: | ||
| altNegativeButton: | ||
| altPositiveButton: | ||
| gravity: 0 | ||
| dead: .189999998 | ||
| sensitivity: 1 | ||
| snap: 0 | ||
| invert: 1 | ||
| type: 2 | ||
| axis: 1 | ||
| joyNum: 0 | ||
| - serializedVersion: 3 | ||
| m_Name: Fire1 | ||
| descriptiveName: | ||
| descriptiveNegativeName: | ||
| negativeButton: | ||
| positiveButton: joystick button 0 | ||
| altNegativeButton: | ||
| altPositiveButton: | ||
| gravity: 1000 | ||
| dead: .00100000005 | ||
| sensitivity: 1000 | ||
| snap: 0 | ||
| invert: 0 | ||
| type: 0 | ||
| axis: 0 | ||
| joyNum: 0 | ||
| - serializedVersion: 3 | ||
| m_Name: Fire2 | ||
| descriptiveName: | ||
| descriptiveNegativeName: | ||
| negativeButton: | ||
| positiveButton: joystick button 1 | ||
| altNegativeButton: | ||
| altPositiveButton: | ||
| gravity: 1000 | ||
| dead: .00100000005 | ||
| sensitivity: 1000 | ||
| snap: 0 | ||
| invert: 0 | ||
| type: 0 | ||
| axis: 0 | ||
| joyNum: 0 | ||
| - serializedVersion: 3 | ||
| m_Name: Fire3 | ||
| descriptiveName: | ||
| descriptiveNegativeName: | ||
| negativeButton: | ||
| positiveButton: joystick button 2 | ||
| altNegativeButton: | ||
| altPositiveButton: | ||
| gravity: 1000 | ||
| dead: .00100000005 | ||
| sensitivity: 1000 | ||
| snap: 0 | ||
| invert: 0 | ||
| type: 0 | ||
| axis: 0 | ||
| joyNum: 0 | ||
| - serializedVersion: 3 | ||
| m_Name: Jump | ||
| descriptiveName: | ||
| descriptiveNegativeName: | ||
| negativeButton: | ||
| positiveButton: joystick button 3 | ||
| altNegativeButton: | ||
| altPositiveButton: | ||
| gravity: 1000 | ||
| dead: .00100000005 | ||
| sensitivity: 1000 | ||
| snap: 0 | ||
| invert: 0 | ||
| type: 0 | ||
| axis: 0 | ||
| joyNum: 0 | ||
| - serializedVersion: 3 | ||
| m_Name: Submit | ||
| descriptiveName: | ||
| descriptiveNegativeName: | ||
| negativeButton: | ||
| positiveButton: return | ||
| altNegativeButton: | ||
| altPositiveButton: joystick button 0 | ||
| gravity: 1000 | ||
| dead: .00100000005 | ||
| sensitivity: 1000 | ||
| snap: 0 | ||
| invert: 0 | ||
| type: 0 | ||
| axis: 0 | ||
| joyNum: 0 | ||
| - serializedVersion: 3 | ||
| m_Name: Submit | ||
| descriptiveName: | ||
| descriptiveNegativeName: | ||
| negativeButton: | ||
| positiveButton: enter | ||
| altNegativeButton: | ||
| altPositiveButton: space | ||
| gravity: 1000 | ||
| dead: .00100000005 | ||
| sensitivity: 1000 | ||
| snap: 0 | ||
| invert: 0 | ||
| type: 0 | ||
| axis: 0 | ||
| joyNum: 0 | ||
| - serializedVersion: 3 | ||
| m_Name: Cancel | ||
| descriptiveName: | ||
| descriptiveNegativeName: | ||
| negativeButton: | ||
| positiveButton: escape | ||
| altNegativeButton: | ||
| altPositiveButton: joystick button 1 | ||
| gravity: 1000 | ||
| dead: .00100000005 | ||
| sensitivity: 1000 | ||
| snap: 0 | ||
| invert: 0 | ||
| type: 0 | ||
| axis: 0 | ||
| joyNum: 0 |
| @@ -0,0 +1,71 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!126 &1 | ||
| NavMeshAreas: | ||
| m_ObjectHideFlags: 0 | ||
| serializedVersion: 2 | ||
| areas: | ||
| - name: Walkable | ||
| cost: 1 | ||
| - name: Not Walkable | ||
| cost: 1 | ||
| - name: Jump | ||
| cost: 2 | ||
| - name: | ||
| cost: 1 | ||
| - name: | ||
| cost: 1 | ||
| - name: | ||
| cost: 1 | ||
| - name: | ||
| cost: 1 | ||
| - name: | ||
| cost: 1 | ||
| - name: | ||
| cost: 1 | ||
| - name: | ||
| cost: 1 | ||
| - name: | ||
| cost: 1 | ||
| - name: | ||
| cost: 1 | ||
| - name: | ||
| cost: 1 | ||
| - name: | ||
| cost: 1 | ||
| - name: | ||
| cost: 1 | ||
| - name: | ||
| cost: 1 | ||
| - name: | ||
| cost: 1 | ||
| - name: | ||
| cost: 1 | ||
| - name: | ||
| cost: 1 | ||
| - name: | ||
| cost: 1 | ||
| - name: | ||
| cost: 1 | ||
| - name: | ||
| cost: 1 | ||
| - name: | ||
| cost: 1 | ||
| - name: | ||
| cost: 1 | ||
| - name: | ||
| cost: 1 | ||
| - name: | ||
| cost: 1 | ||
| - name: | ||
| cost: 1 | ||
| - name: | ||
| cost: 1 | ||
| - name: | ||
| cost: 1 | ||
| - name: | ||
| cost: 1 | ||
| - name: | ||
| cost: 1 | ||
| - name: | ||
| cost: 1 |
| @@ -0,0 +1,8 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!149 &1 | ||
| NetworkManager: | ||
| m_ObjectHideFlags: 0 | ||
| m_DebugLevel: 0 | ||
| m_Sendrate: 15 | ||
| m_AssetToPrefab: {} |
| @@ -0,0 +1,24 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!19 &1 | ||
| Physics2DSettings: | ||
| m_ObjectHideFlags: 0 | ||
| m_Gravity: {x: 0, y: -9.81000042} | ||
| m_DefaultMaterial: {fileID: 0} | ||
| m_VelocityIterations: 8 | ||
| m_PositionIterations: 3 | ||
| m_VelocityThreshold: 1 | ||
| m_MaxLinearCorrection: .200000003 | ||
| m_MaxAngularCorrection: 8 | ||
| m_MaxTranslationSpeed: 100 | ||
| m_MaxRotationSpeed: 360 | ||
| m_MinPenetrationForPenalty: .00999999978 | ||
| m_BaumgarteScale: .200000003 | ||
| m_BaumgarteTimeOfImpactScale: .75 | ||
| m_TimeToSleep: .5 | ||
| m_LinearSleepTolerance: .00999999978 | ||
| m_AngularSleepTolerance: 2 | ||
| m_RaycastsHitTriggers: 1 | ||
| m_RaycastsStartInColliders: 1 | ||
| m_ChangeStopsCallbacks: 0 | ||
| m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
| @@ -0,0 +1,2 @@ | ||
| m_EditorVersion: 5.1.1f1 | ||
| m_StandardAssetsVersion: 0 |
| @@ -0,0 +1,166 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!47 &1 | ||
| QualitySettings: | ||
| m_ObjectHideFlags: 0 | ||
| serializedVersion: 5 | ||
| m_CurrentQuality: 5 | ||
| m_QualitySettings: | ||
| - serializedVersion: 2 | ||
| name: Fastest | ||
| pixelLightCount: 0 | ||
| shadows: 0 | ||
| shadowResolution: 0 | ||
| shadowProjection: 1 | ||
| shadowCascades: 1 | ||
| shadowDistance: 15 | ||
| shadowCascade2Split: .333333343 | ||
| shadowCascade4Split: {x: .0666666701, y: .200000003, z: .466666669} | ||
| blendWeights: 1 | ||
| textureQuality: 1 | ||
| anisotropicTextures: 0 | ||
| antiAliasing: 0 | ||
| softParticles: 0 | ||
| softVegetation: 0 | ||
| realtimeReflectionProbes: 0 | ||
| billboardsFaceCameraPosition: 0 | ||
| vSyncCount: 0 | ||
| lodBias: .300000012 | ||
| maximumLODLevel: 0 | ||
| particleRaycastBudget: 4 | ||
| excludedTargetPlatforms: [] | ||
| - serializedVersion: 2 | ||
| name: Fast | ||
| pixelLightCount: 0 | ||
| shadows: 0 | ||
| shadowResolution: 0 | ||
| shadowProjection: 1 | ||
| shadowCascades: 1 | ||
| shadowDistance: 20 | ||
| shadowCascade2Split: .333333343 | ||
| shadowCascade4Split: {x: .0666666701, y: .200000003, z: .466666669} | ||
| blendWeights: 2 | ||
| textureQuality: 0 | ||
| anisotropicTextures: 0 | ||
| antiAliasing: 0 | ||
| softParticles: 0 | ||
| softVegetation: 0 | ||
| realtimeReflectionProbes: 0 | ||
| billboardsFaceCameraPosition: 0 | ||
| vSyncCount: 0 | ||
| lodBias: .400000006 | ||
| maximumLODLevel: 0 | ||
| particleRaycastBudget: 16 | ||
| excludedTargetPlatforms: [] | ||
| - serializedVersion: 2 | ||
| name: Simple | ||
| pixelLightCount: 1 | ||
| shadows: 1 | ||
| shadowResolution: 0 | ||
| shadowProjection: 1 | ||
| shadowCascades: 1 | ||
| shadowDistance: 20 | ||
| shadowCascade2Split: .333333343 | ||
| shadowCascade4Split: {x: .0666666701, y: .200000003, z: .466666669} | ||
| blendWeights: 2 | ||
| textureQuality: 0 | ||
| anisotropicTextures: 1 | ||
| antiAliasing: 0 | ||
| softParticles: 0 | ||
| softVegetation: 0 | ||
| realtimeReflectionProbes: 0 | ||
| billboardsFaceCameraPosition: 0 | ||
| vSyncCount: 0 | ||
| lodBias: .699999988 | ||
| maximumLODLevel: 0 | ||
| particleRaycastBudget: 64 | ||
| excludedTargetPlatforms: [] | ||
| - serializedVersion: 2 | ||
| name: Good | ||
| pixelLightCount: 2 | ||
| shadows: 2 | ||
| shadowResolution: 1 | ||
| shadowProjection: 1 | ||
| shadowCascades: 2 | ||
| shadowDistance: 40 | ||
| shadowCascade2Split: .333333343 | ||
| shadowCascade4Split: {x: .0666666701, y: .200000003, z: .466666669} | ||
| blendWeights: 2 | ||
| textureQuality: 0 | ||
| anisotropicTextures: 1 | ||
| antiAliasing: 0 | ||
| softParticles: 0 | ||
| softVegetation: 1 | ||
| realtimeReflectionProbes: 1 | ||
| billboardsFaceCameraPosition: 1 | ||
| vSyncCount: 1 | ||
| lodBias: 1 | ||
| maximumLODLevel: 0 | ||
| particleRaycastBudget: 256 | ||
| excludedTargetPlatforms: [] | ||
| - serializedVersion: 2 | ||
| name: Beautiful | ||
| pixelLightCount: 3 | ||
| shadows: 2 | ||
| shadowResolution: 2 | ||
| shadowProjection: 1 | ||
| shadowCascades: 2 | ||
| shadowDistance: 70 | ||
| shadowCascade2Split: .333333343 | ||
| shadowCascade4Split: {x: .0666666701, y: .200000003, z: .466666669} | ||
| blendWeights: 4 | ||
| textureQuality: 0 | ||
| anisotropicTextures: 2 | ||
| antiAliasing: 2 | ||
| softParticles: 1 | ||
| softVegetation: 1 | ||
| realtimeReflectionProbes: 1 | ||
| billboardsFaceCameraPosition: 1 | ||
| vSyncCount: 1 | ||
| lodBias: 1.5 | ||
| maximumLODLevel: 0 | ||
| particleRaycastBudget: 1024 | ||
| excludedTargetPlatforms: [] | ||
| - serializedVersion: 2 | ||
| name: Fantastic | ||
| pixelLightCount: 4 | ||
| shadows: 2 | ||
| shadowResolution: 2 | ||
| shadowProjection: 1 | ||
| shadowCascades: 4 | ||
| shadowDistance: 150 | ||
| shadowCascade2Split: .333333343 | ||
| shadowCascade4Split: {x: .0666666701, y: .200000003, z: .466666669} | ||
| blendWeights: 4 | ||
| textureQuality: 0 | ||
| anisotropicTextures: 2 | ||
| antiAliasing: 2 | ||
| softParticles: 1 | ||
| softVegetation: 1 | ||
| realtimeReflectionProbes: 1 | ||
| billboardsFaceCameraPosition: 1 | ||
| vSyncCount: 1 | ||
| lodBias: 2 | ||
| maximumLODLevel: 0 | ||
| particleRaycastBudget: 4096 | ||
| excludedTargetPlatforms: [] | ||
| m_PerPlatformDefaultQuality: | ||
| Android: 2 | ||
| BlackBerry: 2 | ||
| GLES Emulation: 5 | ||
| Nintendo 3DS: 5 | ||
| PS3: 5 | ||
| PS4: 5 | ||
| PSM: 5 | ||
| PSP2: 2 | ||
| Samsung TV: 2 | ||
| Standalone: 5 | ||
| Tizen: 2 | ||
| WP8: 5 | ||
| Web: 5 | ||
| WebGL: 3 | ||
| Wii U: 5 | ||
| Windows Store Apps: 5 | ||
| XBOX360: 5 | ||
| XboxOne: 5 | ||
| iPhone: 2 |
| @@ -0,0 +1,43 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!78 &1 | ||
| TagManager: | ||
| serializedVersion: 2 | ||
| tags: [] | ||
| layers: | ||
| - Default | ||
| - TransparentFX | ||
| - Ignore Raycast | ||
| - | ||
| - Water | ||
| - UI | ||
| - | ||
| - | ||
| - | ||
| - | ||
| - | ||
| - | ||
| - | ||
| - | ||
| - | ||
| - | ||
| - | ||
| - | ||
| - | ||
| - | ||
| - | ||
| - | ||
| - | ||
| - | ||
| - | ||
| - | ||
| - | ||
| - | ||
| - | ||
| - | ||
| - | ||
| - | ||
| m_SortingLayers: | ||
| - name: Default | ||
| uniqueID: 0 | ||
| locked: 0 |
| @@ -0,0 +1,8 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!5 &1 | ||
| TimeManager: | ||
| m_ObjectHideFlags: 0 | ||
| Fixed Timestep: .0199999996 | ||
| Maximum Allowed Timestep: .333333343 | ||
| m_TimeScale: 1 |
| @@ -0,0 +1,86 @@ | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Text; | ||
|
|
||
| public class Point { | ||
| public int X = 0; | ||
| public int Y = 0; | ||
|
|
||
| public Point(int x, int y) { | ||
| X = x; | ||
| Y = y; | ||
| } | ||
|
|
||
| public static bool operator !=(Point lhs, Point rhs) { return (lhs.X != rhs.X) || (lhs.Y != rhs.Y); } | ||
| public static bool operator ==(Point lhs, Point rhs) { return (lhs.X == rhs.X) && (lhs.Y == rhs.Y); } | ||
| } | ||
|
|
||
| namespace Amazons { | ||
| public class Move { | ||
| public int ID { get; set; } | ||
| public Point MoveTo { get; set; } | ||
| public Point ShootTo { get; set; } | ||
| public Move() { } | ||
| public Move(int id, Point move, Point shoot) { | ||
| ID = id; | ||
| MoveTo = move; | ||
| ShootTo = shoot; | ||
| } | ||
| } | ||
| public class Pawn { | ||
| public int ID { get; protected set; } | ||
| public Point Position; | ||
| private Stack<Move> History; | ||
|
|
||
| public Pawn() { ID = -1; } | ||
| } | ||
|
|
||
| public class Player { | ||
| public int ID { get; protected set; } | ||
| public List<Pawn> Pawns; | ||
| public AmazonAIBase.AIBase AI; | ||
|
|
||
| private Game GameInstance; | ||
|
|
||
| public Player(int id, Game game) { | ||
| ID = id; | ||
| GameInstance = game; | ||
| } | ||
|
|
||
| public int GetIDByPoint(Point point) { | ||
| foreach (var pawn in Pawns) | ||
| if (pawn.Position == point) | ||
| return pawn.ID; | ||
| return -1; | ||
| } | ||
|
|
||
| public List<List<int>> GetBoard() { return GameInstance.Board; } | ||
| public List<List<int>> GetBoard_Simple() { | ||
| var ComplexBoard = GetBoard(); | ||
| var SimpleBoard = new List<List<int>>(); | ||
| for(int x = 0; x < GameInstance.Width; ++x) | ||
| for(int y = 0; y < GameInstance.Height; ++y) | ||
| SimpleBoard[x][y] = ComplexBoard[x][y] > 0 ? (ComplexBoard[x][y] != ID ? 2 : 1) : ComplexBoard[x][y]; | ||
| return SimpleBoard; | ||
| } | ||
| } | ||
| public class Game { | ||
| // -1 = Fire, 0 = Empty, Anything else = Pawn | ||
| public List<List<int>> Board { get; protected set; } | ||
| public int Width { get; protected set; } | ||
| public int Height { get; protected set; } | ||
| public Player[] Players { get; protected set; } | ||
| private Stack<Pawn> History; | ||
|
|
||
| public Game() {} | ||
| } | ||
| } | ||
|
|
||
| namespace AmazonAIBase { | ||
|
|
||
| public class AIBase { | ||
| public string StudentName { get; protected set; } | ||
| private Amazons.Player Owner; | ||
| virtual public Amazons.Move YourTurn() { return new Amazons.Move(); } | ||
| } | ||
| } |
| @@ -0,0 +1,55 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
| <PropertyGroup> | ||
| <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
| <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
| <ProjectGuid>{AB140F68-C213-434C-BE42-DC92D68051D5}</ProjectGuid> | ||
| <OutputType>Library</OutputType> | ||
| <AppDesignerFolder>Properties</AppDesignerFolder> | ||
| <RootNamespace>AmazonAIBase</RootNamespace> | ||
| <AssemblyName>AmazonAIBase</AssemblyName> | ||
| <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> | ||
| <FileAlignment>512</FileAlignment> | ||
| <TargetFrameworkProfile /> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
| <DebugSymbols>true</DebugSymbols> | ||
| <DebugType>full</DebugType> | ||
| <Optimize>false</Optimize> | ||
| <OutputPath>bin\Debug\</OutputPath> | ||
| <DefineConstants>DEBUG;TRACE</DefineConstants> | ||
| <ErrorReport>prompt</ErrorReport> | ||
| <WarningLevel>4</WarningLevel> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
| <DebugType>pdbonly</DebugType> | ||
| <Optimize>true</Optimize> | ||
| <OutputPath>bin\Release\</OutputPath> | ||
| <DefineConstants>TRACE</DefineConstants> | ||
| <ErrorReport>prompt</ErrorReport> | ||
| <WarningLevel>4</WarningLevel> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <Reference Include="System" /> | ||
| <Reference Include="System.Core" /> | ||
| <Reference Include="System.Xml.Linq" /> | ||
| <Reference Include="System.Data.DataSetExtensions" /> | ||
| <Reference Include="Microsoft.CSharp" /> | ||
| <Reference Include="System.Data" /> | ||
| <Reference Include="System.Net.Http" /> | ||
| <Reference Include="System.Xml" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <Compile Include="AIBase.cs" /> | ||
| <Compile Include="Properties\AssemblyInfo.cs" /> | ||
| </ItemGroup> | ||
| <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
| <!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
| Other similar extension points exist, see Microsoft.Common.targets. | ||
| <Target Name="BeforeBuild"> | ||
| </Target> | ||
| <Target Name="AfterBuild"> | ||
| </Target> | ||
| --> | ||
| </Project> |
| @@ -0,0 +1,36 @@ | ||
| using System.Reflection; | ||
| using System.Runtime.CompilerServices; | ||
| using System.Runtime.InteropServices; | ||
|
|
||
| // General Information about an assembly is controlled through the following | ||
| // set of attributes. Change these attribute values to modify the information | ||
| // associated with an assembly. | ||
| [assembly: AssemblyTitle("AmazonAIBase")] | ||
| [assembly: AssemblyDescription("")] | ||
| [assembly: AssemblyConfiguration("")] | ||
| [assembly: AssemblyCompany("Microsoft")] | ||
| [assembly: AssemblyProduct("AmazonAIBase")] | ||
| [assembly: AssemblyCopyright("Copyright © Microsoft 2015")] | ||
| [assembly: AssemblyTrademark("")] | ||
| [assembly: AssemblyCulture("")] | ||
|
|
||
| // Setting ComVisible to false makes the types in this assembly not visible | ||
| // to COM components. If you need to access a type in this assembly from | ||
| // COM, set the ComVisible attribute to true on that type. | ||
| [assembly: ComVisible(false)] | ||
|
|
||
| // The following GUID is for the ID of the typelib if this project is exposed to COM | ||
| [assembly: Guid("ab140f68-c213-434c-be42-dc92d68051d5")] | ||
|
|
||
| // Version information for an assembly consists of the following four values: | ||
| // | ||
| // Major Version | ||
| // Minor Version | ||
| // Build Number | ||
| // Revision | ||
| // | ||
| // You can specify all the values or you can default the Build and Revision Numbers | ||
| // by using the '*' as shown below: | ||
| // [assembly: AssemblyVersion("1.0.*")] | ||
| [assembly: AssemblyVersion("1.0.0.0")] | ||
| [assembly: AssemblyFileVersion("1.0.0.0")] |
| @@ -0,0 +1,9 @@ | ||
| C:\Users\craig.jong\AmazonsAI\AmazonsAI\AmazonAIBase\bin\Release\AmazonAIBase.dll | ||
| C:\Users\craig.jong\AmazonsAI\AmazonsAI\AmazonAIBase\bin\Release\AmazonAIBase.pdb | ||
| C:\Users\craig.jong\AmazonsAI\AmazonsAI\AmazonAIBase\obj\Release\AmazonAIBase.dll | ||
| C:\Users\craig.jong\AmazonsAI\AmazonsAI\AmazonAIBase\obj\Release\AmazonAIBase.pdb | ||
| Y:\AmazonsAI\AmazonsAI\AmazonAIBase\bin\Release\AmazonAIBase.dll | ||
| Y:\AmazonsAI\AmazonsAI\AmazonAIBase\bin\Release\AmazonAIBase.pdb | ||
| Y:\AmazonsAI\AmazonsAI\AmazonAIBase\obj\Release\AmazonAIBase.csprojResolveAssemblyReference.cache | ||
| Y:\AmazonsAI\AmazonsAI\AmazonAIBase\obj\Release\AmazonAIBase.dll | ||
| Y:\AmazonsAI\AmazonsAI\AmazonAIBase\obj\Release\AmazonAIBase.pdb |
| @@ -0,0 +1,28 @@ | ||
|
|
||
| Microsoft Visual Studio Solution File, Format Version 12.00 | ||
| # Visual Studio 14 | ||
| VisualStudioVersion = 14.0.23107.0 | ||
| MinimumVisualStudioVersion = 10.0.40219.1 | ||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AmazonsAI", "AmazonsAI\AmazonsAI.csproj", "{233AB44D-6B43-4159-832B-A9992D8ED1E5}" | ||
| EndProject | ||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AmazonAIBase", "AmazonAIBase\AmazonAIBase.csproj", "{AB140F68-C213-434C-BE42-DC92D68051D5}" | ||
| EndProject | ||
| Global | ||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
| Debug|Any CPU = Debug|Any CPU | ||
| Release|Any CPU = Release|Any CPU | ||
| EndGlobalSection | ||
| GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
| {233AB44D-6B43-4159-832B-A9992D8ED1E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
| {233AB44D-6B43-4159-832B-A9992D8ED1E5}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
| {233AB44D-6B43-4159-832B-A9992D8ED1E5}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
| {233AB44D-6B43-4159-832B-A9992D8ED1E5}.Release|Any CPU.Build.0 = Release|Any CPU | ||
| {AB140F68-C213-434C-BE42-DC92D68051D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
| {AB140F68-C213-434C-BE42-DC92D68051D5}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
| {AB140F68-C213-434C-BE42-DC92D68051D5}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
| {AB140F68-C213-434C-BE42-DC92D68051D5}.Release|Any CPU.Build.0 = Release|Any CPU | ||
| EndGlobalSection | ||
| GlobalSection(SolutionProperties) = preSolution | ||
| HideSolutionNode = FALSE | ||
| EndGlobalSection | ||
| EndGlobal |
| @@ -0,0 +1,58 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
| <PropertyGroup> | ||
| <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
| <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
| <ProjectGuid>{233AB44D-6B43-4159-832B-A9992D8ED1E5}</ProjectGuid> | ||
| <OutputType>Library</OutputType> | ||
| <AppDesignerFolder>Properties</AppDesignerFolder> | ||
| <RootNamespace>AmazonsAI</RootNamespace> | ||
| <AssemblyName>AmazonsAI</AssemblyName> | ||
| <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> | ||
| <FileAlignment>512</FileAlignment> | ||
| <TargetFrameworkProfile /> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
| <DebugSymbols>true</DebugSymbols> | ||
| <DebugType>full</DebugType> | ||
| <Optimize>false</Optimize> | ||
| <OutputPath>bin\Debug\</OutputPath> | ||
| <DefineConstants>DEBUG;TRACE</DefineConstants> | ||
| <ErrorReport>prompt</ErrorReport> | ||
| <WarningLevel>4</WarningLevel> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
| <DebugType>pdbonly</DebugType> | ||
| <Optimize>true</Optimize> | ||
| <OutputPath>bin\Release\</OutputPath> | ||
| <DefineConstants>TRACE</DefineConstants> | ||
| <ErrorReport>prompt</ErrorReport> | ||
| <WarningLevel>4</WarningLevel> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <Reference Include="AmazonAIBase"> | ||
| <HintPath>..\AmazonAIBase\bin\Release\AmazonAIBase.dll</HintPath> | ||
| </Reference> | ||
| <Reference Include="System" /> | ||
| <Reference Include="System.Core" /> | ||
| <Reference Include="System.Xml.Linq" /> | ||
| <Reference Include="System.Data.DataSetExtensions" /> | ||
| <Reference Include="Microsoft.CSharp" /> | ||
| <Reference Include="System.Data" /> | ||
| <Reference Include="System.Net.Http" /> | ||
| <Reference Include="System.Xml" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <Compile Include="StudentAI.cs" /> | ||
| <Compile Include="Properties\AssemblyInfo.cs" /> | ||
| </ItemGroup> | ||
| <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
| <!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
| Other similar extension points exist, see Microsoft.Common.targets. | ||
| <Target Name="BeforeBuild"> | ||
| </Target> | ||
| <Target Name="AfterBuild"> | ||
| </Target> | ||
| --> | ||
| </Project> |
| @@ -0,0 +1,36 @@ | ||
| using System.Reflection; | ||
| using System.Runtime.CompilerServices; | ||
| using System.Runtime.InteropServices; | ||
|
|
||
| // General Information about an assembly is controlled through the following | ||
| // set of attributes. Change these attribute values to modify the information | ||
| // associated with an assembly. | ||
| [assembly: AssemblyTitle("AmazonsAI")] | ||
| [assembly: AssemblyDescription("")] | ||
| [assembly: AssemblyConfiguration("")] | ||
| [assembly: AssemblyCompany("Microsoft")] | ||
| [assembly: AssemblyProduct("AmazonsAI")] | ||
| [assembly: AssemblyCopyright("Copyright © Microsoft 2015")] | ||
| [assembly: AssemblyTrademark("")] | ||
| [assembly: AssemblyCulture("")] | ||
|
|
||
| // Setting ComVisible to false makes the types in this assembly not visible | ||
| // to COM components. If you need to access a type in this assembly from | ||
| // COM, set the ComVisible attribute to true on that type. | ||
| [assembly: ComVisible(false)] | ||
|
|
||
| // The following GUID is for the ID of the typelib if this project is exposed to COM | ||
| [assembly: Guid("233ab44d-6b43-4159-832b-a9992d8ed1e5")] | ||
|
|
||
| // Version information for an assembly consists of the following four values: | ||
| // | ||
| // Major Version | ||
| // Minor Version | ||
| // Build Number | ||
| // Revision | ||
| // | ||
| // You can specify all the values or you can default the Build and Revision Numbers | ||
| // by using the '*' as shown below: | ||
| // [assembly: AssemblyVersion("1.0.*")] | ||
| [assembly: AssemblyVersion("1.0.0.0")] | ||
| [assembly: AssemblyFileVersion("1.0.0.0")] |
| @@ -0,0 +1,16 @@ | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Text; | ||
| using AmazonAIBase; | ||
|
|
||
| namespace AmazonsAI | ||
| { | ||
| public class CraigJong : AmazonAIBase.AIBase | ||
| { | ||
| public CraigJong() | ||
| { | ||
| StudentName = "CONNOR TAMPSOORT"; | ||
|
|
||
| } | ||
| } | ||
| } |
| @@ -0,0 +1,5 @@ | ||
| C:\Users\craig.jong\AmazonsAI\AmazonsAI\AmazonsAI\bin\Debug\AmazonsAI.dll | ||
| C:\Users\craig.jong\AmazonsAI\AmazonsAI\AmazonsAI\bin\Debug\AmazonsAI.pdb | ||
| C:\Users\craig.jong\AmazonsAI\AmazonsAI\AmazonsAI\obj\Debug\AmazonsAI.csprojResolveAssemblyReference.cache | ||
| C:\Users\craig.jong\AmazonsAI\AmazonsAI\AmazonsAI\obj\Debug\AmazonsAI.dll | ||
| C:\Users\craig.jong\AmazonsAI\AmazonsAI\AmazonsAI\obj\Debug\AmazonsAI.pdb |
| @@ -0,0 +1,6 @@ | ||
| C:\Users\craig.jong\AmazonsAI\AmazonsAI\AmazonsAI\bin\Release\AmazonsAI.dll | ||
| C:\Users\craig.jong\AmazonsAI\AmazonsAI\AmazonsAI\bin\Release\AmazonsAI.pdb | ||
| C:\Users\craig.jong\AmazonsAI\AmazonsAI\AmazonsAI\bin\Release\AmazonAIBase.dll | ||
| C:\Users\craig.jong\AmazonsAI\AmazonsAI\AmazonsAI\bin\Release\AmazonAIBase.pdb | ||
| C:\Users\craig.jong\AmazonsAI\AmazonsAI\AmazonsAI\obj\Release\AmazonsAI.dll | ||
| C:\Users\craig.jong\AmazonsAI\AmazonsAI\AmazonsAI\obj\Release\AmazonsAI.pdb |