Page 1 of 1

Four in a row!

PostPosted: 08 Aug 2013, 19:41
by joppiesaus
Hi, I coded a program in C# so you can play together four in a row!
It is a simple program, I am proud on it, becuase it is very error-strong, and you can do everything with it.

Here's the program:
4InARow.zip
4InARow.exe
(7.21 KiB) Downloaded 64 times


And here's the source in case you are interested:
4InARow Source Code.zip
4InARow Source Code
(10.49 KiB) Downloaded 71 times


Have fun with it! :D

EDIT: Should I add this to CyberCriminal? Opinions?

Re: Four in a row!

PostPosted: 08 Aug 2013, 23:18
by Conor
The game was fun to play :) And the code is very complex, awesome stuff, I admire your work.

Spoiler:


You should take a look at GitHub - it's a place where you can publicly code all of your projects for easier sharing :)

Re: Four in a row!

PostPosted: 08 Aug 2013, 23:41
by ismellike
Omg this game is awesome.
Me and my friend play it on the bus trips for sports/activities.
I've actually thought about creating a version for windows phone, but instead I decided to make a calculator.
Anyways, good luck on it.
I recommend you get the windows phone sdk and translate it into an app.

Re: Four in a row!

PostPosted: 08 Aug 2013, 23:42
by HETAL
I may sound like a newby but is a obj file nessecary in the source

Re: Four in a row!

PostPosted: 09 Aug 2013, 09:01
by joppiesaus
Thanks for all the comments! :)
I should look at your bug, Conor!

HETAL wrote:I may sound like a newby but is a obj file nessecary in the source

And Hetal, the obj folder is full with temporary stuff to create and compile the binary's(the final .exe's)
And, in the obj folder is also stored what is opened in VS if you start your project(for example you have main.cs open, you quit, and then you start up your project, and then there's main.cs open again as you left it.)
So it isn't really nessecary.

Re: Four in a row!

PostPosted: 09 Aug 2013, 11:33
by HETAL
Ahh thx :D

Re: Four in a row!

PostPosted: 09 Aug 2013, 12:34
by joppiesaus
Conor wrote:The game was fun to play :) And the code is very complex, awesome stuff, I admire your work.

Spoiler:


You should take a look at GitHub - it's a place where you can publicly code all of your projects for easier sharing :)


I've got the problem. I am going to fix it. :)
The system checks it like this:
You place a fisch(That round thinggy) into the rack.
Then, the fisch got checked if the player has four in a row from the placed fisch

So this will work:
Code: Select all
     at the O you place an Y, it will work. :)
YYYO


But this not:
Code: Select all
     at the O you place an Y, it will not work. :(
YOYY

So I am going to make the system to check every inserted fisch(This will slow down the performance. :( ), I think.

Re: Four in a row!

PostPosted: 09 Aug 2013, 13:02
by joppiesaus
Here's the fix(And hopefully the final update)!
Here's the source:
4InARow Source Code.zip
4InARow Source code
(9.22 KiB) Downloaded 60 times

(direct main class)
Spoiler:


And here are the executables:
Release.zip
4InARow.exe
(7.55 KiB) Downloaded 64 times


Thank you for all your nice comments!

Dear moderator, can you replace the attachments in the topic with these ones? And if you remove this post, will you add the direct main class in a spoiler? Thank you very much! :)

Re: Four in a row!

PostPosted: 30 Oct 2013, 21:00
by joppiesaus
Wow... I looked into my code and I think "What is this new sort of spaghetti-code?"(The code aint that bad, but it's a little bit messy) xD
Anyways, I am programming Reversi next... which is a lot more complicated and so far I have clean code.
I am also working on a AI for it! You can choose, or You vs. Computer or You vs. You friend. :D

I may rewrite this so you can have a game with your favorite computer. But that's future.