Object-Oriented Programming concepts
"Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which are data structures that contain data, in the form of fields, often known as attributes; and code, in the form of procedures, often known as methods. "
The above is the definition of Object-Oriented Programming from wiki. In week 6, we finished the tippy using minimax method. The user could play tippy in python interface. In the game which I designed, the user could choose the range of graph that he or she wanted to play. Computer is the opponent, which will find the best option that could defense and lead to winning.
The followings are the some structure of minimax:
The followings are the some structure of minimax:
It is very interesting, when writing the Tippy program, we need to find all situation that a tippy could put on the board:
++ ++ + +
++ ++ ++ ++
+ +
The computer need to use minimax method to choose the best place to put + on the board among all the options. And we also need to make sure the program can tell the user the result: win, lost or tie.
There are many details we need to think about, and we need to play the game for a while in order to make sure player could understand the game easily, and exclude any bugs.


没有评论:
发表评论