Pascal

Moderators: None (Apply to moderate this forum)
Number of threads: 4095
Number of posts: 14004

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
help with oop and tictactoe Posted by jiyong on 1 Dec 2012 at 2:53 PM
I am looking for an example of a two-player tic tac toe program that can vary in board size and asks the user how big the board should be (for example, somewhere between 3 and 15; the number must be odd because diagonal paths have to be able to work out since all the original rules of tic tac toe apply).

The program should
- ask for each player to make a move
- update and displays the board after each move
- evaluate the board to see if someone has won or has drawn the game
- exit the program after the game is over

I've never programmed in Pascal before.

Would it be easier to write this sort of program in Pascal with or without an object-oriented design?

Does anyone have examples to show me which would be very similar to what I'm asking for? For example, maybe a varied l
Report
Re: help with oop and tictactoe Posted by Pelle-48 on 2 Dec 2012 at 11:53 AM
You have some examples with tic-tac-toe here:
http://rosettacode.org/wiki/Tic-tac-toe

Pascal code is not made for this game yet (maybe somewhere else)but take a look at Ada!



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.