Skip to content

Commit

Permalink
fixed fringe case where both snakes crossed at same time
Browse files Browse the repository at this point in the history
  • Loading branch information
qcmx16 committed Oct 29, 2018
1 parent 62f724a commit 6d4b77f
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Blockade/Assets/Blockade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ void Update () {
{
timer = 0;
current += direction;
current2 += direction2;
if(grid[(int)current.x, (int)current.y].GetComponent<SpriteRenderer>().sprite == green)
if (grid[(int)current.x, (int)current.y].GetComponent<SpriteRenderer>().sprite == green)
{
score2++;
gameOver(1);
}
current2 += direction2;
if (grid[(int)current2.x, (int)current2.y].GetComponent<SpriteRenderer>().sprite == green)
{
score1++;
Expand Down
Binary file added Blockade/Assets/Sprites/arrow.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
88 changes: 88 additions & 0 deletions Blockade/Assets/Sprites/arrow.jpg.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Blockade/ProjectSettings/EditorBuildSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ EditorBuildSettings:
serializedVersion: 2
m_Scenes:
- enabled: 1
path: Assets/Scenes/SampleScene.unity
guid: 2cda990e2423bbf4892e6590ba056729
path: Assets/BlockadeScene.unity
guid: 478bb13ad1f86734ab94406b65874e54
m_configObjects: {}

0 comments on commit 6d4b77f

Please sign in to comment.