Skip to content

Commit

Permalink
add dependencies for mac and an updater :)
Browse files Browse the repository at this point in the history
  • Loading branch information
DarthMDev committed Dec 7, 2016
1 parent 8c09405 commit 396f5e4
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 3 deletions.
6 changes: 6 additions & 0 deletions install_dependencies.command
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
cd "$(dirname "$0")"
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install git
sudo xcode-select --install
brew install python
sudo pip install gitpython
24 changes: 22 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
First run the python msi installer if on windows
if on mac run the .pkg file
First for windows users do these instructions:
install [git](http://git-scm.com/download/win) and make the git commands available to the windows command prompt..

when you see this:

![git setup image](http://i.gyazo.com/50f6fa4ac05ea7a75c2f5275837e89d1.png)

pick the 3rd option (available to command prompt plus linux utils)

when you see:

![git setup image](http://i.gyazo.com/0eeb0f1dded7534ea1c0865bfa1f82e0.png)

pick the 1st option.. (checkout windows-style, commit unix-style)
After you do these steps open cmd and then cd to your desktop or anywhere you want to put the tic tac toe game in
example :
cd c:\Users\(username)\Desktop
then do these commands :
git clone https://github.com/mgracer48/tic-tac-toe
git checkout stable
Then run install_depdencies.command(on mac)
Then run the python msi installer if on windows
then if your on windows run the start-game.bat
if on mac run start-game.command
and thats it :)
1 change: 1 addition & 0 deletions start-game.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@echo off
git pull
python tic_tac_toe.py
pause
1 change: 1 addition & 0 deletions start-game.command
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
cd "$(dirname "$0")"
python updater.py
python tic_tac_toe.py
7 changes: 6 additions & 1 deletion tic_tac_toe.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def checkAll(char):
return True
if checkLine(char, 2, 5, 8):
return True

def show():
print board[0], '|', board[1], '|', board[2]
print '----------'
Expand All @@ -50,6 +50,7 @@ def multiplayer():
input = int(input)
if board[input] != 'x' and board[input] != 'o':
board[input] = 'x'
show()
#check
if checkAll('x') == True:
print "Player 1 wins!"
Expand Down Expand Up @@ -99,6 +100,10 @@ def single_player():
if selectmode == 'single player':
while True:
single_player()
#if win == True:
# askplayagain = raw_input('Want to play again? Enter y for yes or n for no.')

#playagain()
break
elif selectmode == 'multiplayer':
while True:
Expand Down
4 changes: 4 additions & 0 deletions updater.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import git

g = git.cmd.Git(git_dir)
g.pull()

0 comments on commit 396f5e4

Please sign in to comment.