Simple Tic Tac Toe

Feb 20th, 2009 – 6:51 am | Design

Simple Tic Tac Toe release.This is a small funny game written in Python using Alpha-beta pruning algorithm. It’s also an experimental program for my py & wxpython study.So just sit back and enjoy this game.All the suggestions about this game will be welcome.

New Version update!

Detail:

Version: 1.1 Beta

Language: Python 2.5 + wxpyhon 2.8

Platforms: Windows XP/Vista/Windows 7

Last Update: February 27, 2009

How to play

Simple Tic Tac Toe is a funny game for two players, O and X, who take turns marking the spaces in a 3*3 grid.The player who succeeds in placing three respective marks in a horizontal, vertical or diagonal row first wins the game. (Learn more about the rules of tic tac toe)

1. Get Start:

Choose one mode (Robot VS Man(one player) mode or Man VS Man (two player)) on the meun to get start.You can pick a opponent in Robot VS Man mode.The Robot “King” which hava the highest AI is invincible.

2. Rules

You can keep playing if you agree to continue after each round is over.Your score will be recorded & updated in time.What’s more,you can save the current game or open a old game to continue.Final score will be printed when you close the running game or refuse to continue.You can check out whether you have set a new record on the High Score borad. lol

3. Score

Man VS Man Mode

Win +10 | Drawn +5 | Lost +0 | Goback +0

Man VS Robot Mode

U Vs Robot Jack: Win +10 | Drawn +5 | Lost +0 | Goback +0

U Vs Robot Queen: Win +15 | Drawn +10 | Lost +0 | Goback +0

U Vs Robot King: Win +50 | Drawn +15 | Lost +0 | Goback +0

(Notice: If one player go back in one round.He can’t score in this round even if he wins or draws.)

Feel free to leave a comment or mail me if u have any suggestion or find a bug in this game.Thank you

Update:

Fixed a bug that unable to end the process when the program is closed

Download (.py source &.exe file included)

14 Comments

brycholeFebruary 20, 2009

I just had a try on it.
On “How To Play”, you did make a simple mistake at the very beginning. It’s “An easy and funny game”. Haha.

KavinFebruary 20, 2009

@brychole Oops,Got it = =! 真是低级错误,你眼够尖的,哈哈

bangFebruary 20, 2009

用英文写 这么牛

adrianFebruary 20, 2009

i would like to see you to port the code to IronPython, which is .NET implementation of Python, haha.

KavinFebruary 20, 2009

@bang 为了过四级,哈哈~kidding
@adrian 嗯,好啊~我得先把代码再整理下,呵呵

jeffFebruary 20, 2009

good

brycholeFebruary 21, 2009

嘻嘻,有bug了。New Game的时候只要Name和Diffuculty都按Cancel一样可以进入游戏,而且Robot win了player还能继续玩,而且不会提示结束,你试试吧……

KavinFebruary 21, 2009

其实Robot win了还是可以继续下一局的~~~这个积分是一直这么一直积下去,直到你Close game或者在每局结束时选择不再继续才算结束。然后那个Cancel我还真给漏了,这就去改,哈哈

hooraceFebruary 22, 2009

python的游戏其实有一个pygame的包的,用那个或许更好!

KavinFebruary 22, 2009

嗯,目前还没研究过pygame,当时我做这个其实是为了练习下wxpython,呵呵~

strangerFebruary 28, 2009

全英文…

nataliia21December 25, 2009

I want to quote your post in my blog. It can?
And you et an account on Twitter?

KavinDecember 25, 2009

@nataliia21 Sure u can. And my twitter account is @kavin_gray.

cihanJanuary 13, 2010

you did a good job kid, one of the best GUIs for this game i have ever seen, cool !

Leave a comment