Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Labview Challenge 3 (http://www.chiefdelphi.com/forums/showthread.php?t=137912)

Bpk9p4 08-05-2015 10:18 AM

Labview Challenge 3
 
Labview Challenge 3
This challenge is a 4 part challenge to make a tic-tac-toe game


Part 1)
You will need to make a two player tic-tac-toe game.

Requirements
1) Must have a two player
2) Must show if someone has won or there is a draw
3) Must show whose turn it is
4) Must be able to reset
5) Must show different marks for each player

Part 2)
Same as above however add in being able to play against the computer.

Requirements
1) Must have a two player mode and a play vs the computer mode
2) Must show if someone has won or there is a draw
3) Must show whose turn it is
4) Must be able to reset
5) Must show different marks for each player


Part 3)
Tic-Tac-Toe is a game where you should never be able to win. This part is to make a computer player that you can never beat

Requirements
1) Must have a two player mode and a play vs the computer mode
2) Must show if someone has won or there is a draw
3) Must show whose turn it is
4) Must be able to reset
5) Must show different marks for each player
6) Cannot beat the computer

Part 4)
This part is a variation of tic-tac-toe. In this version you are only allowed to have 3 marks of your kind on the board. They way this works is once you put down your 4th mark your 1st mark is removed. This continues on until someone wins. In this version try to make the computer never lose however I am not sure if that is possible so just try your best.

Requirements
1) Must have a two player mode and a play vs the computer mode
2) Must show if someone has won or there is a draw
3) Must show whose turn it is
4) Must be able to reset
5) Must show different marks for each player
6) Never ending Tic-Tac-Toe version

GuyM142 08-05-2015 05:59 PM

Re: Labview Challenge 3
 
Any suggestions for how to make it visual and more game-like?
My FRC experience never involved a lot of front panel programming.

Owen Busler 08-05-2015 06:36 PM

Re: Labview Challenge 3
 
My first thought was to have a 3x3 square of buttons to select the spot you want to go, then a 3x3 text array to display the current board. With other toggle switches and displays for whos turn it is and such.

But i dont know of a way to make it where you click the game board with x's and o's

jhersh 08-06-2015 01:59 PM

Re: Labview Challenge 3
 
1 Attachment(s)
Quote:

Originally Posted by Owen Busler (Post 1492524)
My first thought was to have a 3x3 square of buttons to select the spot you want to go, then a 3x3 text array to display the current board. With other toggle switches and displays for whos turn it is and such.

But i dont know of a way to make it where you click the game board with x's and o's

I threw together a quick starting point for the interaction with a board UI. There is no game logic behind it, just the board itself.

Hope that helps.

hardcopi 08-06-2015 03:42 PM

Re: Labview Challenge 3
 
Here is what 2959's programmers did for this challenge:

https://www.youtube.com/watch?v=H7bqImeUZNg

Well they did it this summer as part of an internship, but it was close enough to this challenge to be noteworthy.

hardcopi 08-06-2015 03:44 PM

Re: Labview Challenge 3
 
Here is what 2959's programmers did for this challenge:

https://www.youtube.com/watch?v=H7bqImeUZNg

Well they did it this summer as part of an internship, but it was close enough to this challenge to be kinda cool.

GuyM142 08-07-2015 07:38 AM

Re: Labview Challenge 3
 
1 Attachment(s)
Finally finished! Took me about three hours in total.
I will upload it as an application for now because the code needs some more documentation.
Let me know if you found a bug or if you could win in the unbeatable mode.

wt200999 08-19-2015 12:28 AM

Re: Labview Challenge 3
 
1 Attachment(s)
I've attached my solution, includes part 1 and 3.

I wanted to play with DVRs + recursion. My only complaint with LabVIEW in this case is you cant have a DVR of a typedef in the typedef itself. You have to cast it to a different type (Int32 in this example).

For example in C you can do something like:

Code:

struct Node {
int data;
Node** children;
}

Instead you have to do something like

Code:

struct Node {
int data;
void** children;
}

and handle the proper typecast outside the typedef.

Also Bpk9p4 you picked the hardest one on my list!


All times are GMT -5. The time now is 06:08 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi