Presentation is loading. Please wait.

Presentation is loading. Please wait.

Learning C++ the Fun Way Taesoo Kim Dr. Ramon Lawrence Computer Science.

Similar presentations


Presentation on theme: "Learning C++ the Fun Way Taesoo Kim Dr. Ramon Lawrence Computer Science."— Presentation transcript:

1 Learning C++ the Fun Way Taesoo Kim Dr. Ramon Lawrence Computer Science

2 About C++ Widely known Introduced 2nd year of college Difficult task to learn Taught by doing programming projects Making a game in C++ is a fun assignment

3 Goals of the project Construct infrastructure for teaching C++ –Critical Mass Motivate students to program Allow students to play over the internet Test student’s game implementations

4 How the game is played

5 Components of Infrastructure The applet is written in Java –CriticalMass.java –Displays the game –Applet runs in internet browsers The core of the game is written in C++ –CM.h –AI of the game –What students write and upload Linkage between Java file and C++ file –CriticalMass.cxx MySQL database contains C++ code and user information

6 How the Infrastructure works

7 How the graphical aspect of the game works Applet initializes 5 x 6 matrix –Matrix contains square information Applet draws the board –Grid –Bombs

8 Sample design of the core The Move Generator –Goes through every square and tries to insert a bomb –If it can’t moves to the next square The Board Evaluator –Point system 6 - corner, 5 - sides, 4 - interior add the points. Better boards will have a higher sum reason for specific point value –Who has the most bombs in the best position

9 Continued... The Game Tree –built by recursion –makes every valid move and creates the board corresponding that move –makes an opponent move in response –makes another move in response –evaluates using the board evaluator and picks the best –assumes that each player will make the best move

10 Conclusion Attract students to program often Encourage competition among students Motivate students to improve their work

11 END...


Download ppt "Learning C++ the Fun Way Taesoo Kim Dr. Ramon Lawrence Computer Science."

Similar presentations


Ads by Google