Previous Page | Next Page

by unknownfile at 8:17 AM EST on November 13, 2006
I've been working on a Lagrange Point NSFE. go fetch
Results are in by unknownfile at 1:42 PM EST on November 16, 2006
As a result of an 82% average on my report card, I'm going to get $100 funding for a new SATA hard disk. I'm hoping to have one in the 300-400 GB range, that way I can store all the stuff on my Acomdata external on it.

Other neato stuff planned for this weekend:

- Bleach 11 (We're almost up to the Soul Society arc)
- The wiping of Fedora Core 5 from both my systems (I never use it), resulting in the death of UFBot
- Shitloads of homework (obviously)

Just got 25/30 on my most recent Turing test as well. :)

Last but not least, I'm already planning ahead on revamping both my systems, and possibly building another with allowance, aka my only source of funding.

Plans for Mist:

- Fill all the SATA controllers (1 is filled)
- New case with more oomph and fans
- Max out memory (try to get it to 8 GB, if possible)

Plans for Sea:

- New case
- Max out memory (maximum is 3 GB, to my knowledge)
- Replace optical drives
- New CPU (hopefully 2 GHz, it currently runs at 1.5 GHz)

Also, the name for the new machine I plan on constructing is Dew. (There's a pattern here somewhere.)
by hcs at 9:42 PM EST on November 16, 2006
So you passed a Turing test? Welcome to humanity.

Also, yay for Soul Society (looking forward to the eventual Kenpachi battle).
...and hard disk = installed by unknownfile at 5:37 PM EST on November 17, 2006
I now have my new harddisk running. Because the rediculously oversized fan is in the way of the second slot of the hard drive section (right above the Western Digital 160 GB disk I have), I put it in the floppy slot. It's now formatting, and I should be able to start moving stuff over from my old Acomdata external disk when it's finished.
Random Turing Project v1.0 by unknownfile at 1:35 PM EST on November 22, 2006
Tic-Tac-Toe. Placed here for those interested.
(I'd rather write this in cpp, but I don't know some functions.)

*** SOURCE CODE START ***

/*
Tic-Tac-Turing
written by Peter Conway
The AI is rather lame, but hey



Implement'd:
- board
- breaking from the loop
- input
- name selection

Todo:
- AI
- When someone wins, get out of the mainloop

*/

var humanplayername : string
var compuplayername : string
var move : boolean := true
var pwned : boolean := false % this ends the mainloop
var board : char (9) % this is a 3x3 board, so yeah

/*
board layout (in char)

1|2|3
4|5|6
7|8|9

solutions:
(horizontally)
1-2-3
4-5-6
7-8-9
(vertically)
1-4-7
2-5-8
3-6-9
(diagonally)
1-5-9
3-5-7

*/

function generatename : string
% generates a name
var randstuffs : int := Rand.Int (1, 10)
if randstuffs = 1 then
result "Frank"
elsif randstuffs = 2 then
result "Bob"
elsif randstuffs = 3 then
result "Joe"
elsif randstuffs = 4 then
result "Adam"
elsif randstuffs = 5 then
result "Alan"
elsif randstuffs = 6 then
result "Yourmom"
elsif randstuffs = 7 then
result "Pat the Cow"
elsif randstuffs = 8 then
result "Jimothy"
elsif randstuffs = 9 then
result "Cowfish"
else
result "Randomguy"
end if
end generatename

procedure domove
var cor : int
var spot : int
% Controls play movements from both the computer and the player.
if move = true then
% human's turn
locate (2, 1)
put "Please input where you want to put your marker"
put "coordinate: " ..
get cor
cls % we're done moving
if cor > 9 then
locate (20, 1)
put "That spot doesn't exist, idiot" % prevent a crash
elsif board (cor) = "N" then
locate (20, 1)
put "Spot is untaken"
board (cor) := "X" % This spot is MINE!
else
locate (20, 1)
put "This spot is taken"
end if
end if
end domove

procedure playerstats
% This displays the player names at the top of the screen
% Geez, can't you look at the name?!
locate (1, 1)
put "Player: ", humanplayername ..
if move = true then
put " * " % indicate that it's this player's move
end if
locate (1, 50)
put "Computer: ", compuplayername ..
if move = false then
put " * " % indicate that it's this player's move
end if
end playerstats

procedure getplayername
put "Please tell me your name"
get humanplayername : *
put "Thank you."
compuplayername := generatename
cls
end getplayername

procedure draw_box


locate (5, 10)
put " | | "
locate (6, 10)
put " _____|________|______"
locate (7, 10)
put " | | "
locate (8, 10)
put " | | "
locate (9, 10)
put " _____|________|______"
locate (10, 10)
put " | | "
locate (11, 10)
put " | | "
locate (13, 1)
put "Layout is as follows"
put " 1|2|3\n",
" 4|5|6\n",
" 7|8|9\n"
% now allocate stuff
locate (5, 12)
if board (1) = "N" then
put ""
else
put board (1)
end if
locate (5, 20)
if board (2) = "N" then
put ""
else
put board (2)
end if
locate (5, 28)
if board (3) = "N" then
put ""
else
put board (3)
end if
locate (8, 12)
if board (4) = "N" then
put ""
else
put board (4)
end if
locate (8, 20)
if board (5) = "N" then
put ""
else
put board (5)
end if
locate (8, 28)
if board (6) = "N" then
put ""
else
put board (6)
end if
locate (11, 12)
if board (7) = "N" then
put ""
else
put board (7)
end if
locate (11, 20)
if board (8) = "N" then
put ""
else
put board (8)
end if
locate (11, 28)
if board (9) = "N" then
put ""
else
put board (9)
end if
end draw_box

procedure mainloop
% This is the main loop.
% Tweakage in this loop would be quite nasty.
loop
draw_box % drawbox is reserved. damnit.
playerstats
domove
if pwned = true then
exit % we're all done here!
end if
end loop
end mainloop

% start()
getplayername
%initialise the board
for x : 1 .. 9
board (x) := "N"
end for
mainloop

*** SOURCE CODE END ***
by Josh W at 6:44 PM EST on November 22, 2006
looks bit like pascal.

C++ is unlike basic or turing because it has no such functions to clear the screen or put stuff at specific locations with color. Unless you use special windows functions like SetConsoleCursorPosition and FillConsoleOutputCharacter

C and C++ are a lot like regular people and rich-snobby people. Regular people can pass off as rich people because it is easy to imitate them, but rich people don't dare act like regular people -- it's uncouth ;)

edited 7:25 PM EST November 22, 2006
by unknownfile at 10:25 PM EST on November 22, 2006
Turing is Pascal-based according to the official documents.

And porting this to C++ would be interesting :)
by unknownfile at 9:57 AM EST on November 23, 2006
Did a bit more coding right now, stuff now implemented includes AI. The AI is somewhat buggy due to the if then else section that determines what to block.
by unknownfile at 2:55 PM EST on November 24, 2006
Newest version of Tic-Tac-Turing is up at http://unknown.hcs64.com/progs . I fixed an annoying bug relating to diagonal detection, but a bug that allows the computer to move twice still exists.

Anyways, I'm about to exit computer class and go home to a weekend and... homework, assignments and studying for tests >_<
by hcs at 10:25 PM EST on November 24, 2006
FWIW, the first original program I spent any time on was Tic-Tac-Toe, in QBasic. It had a theme song...

Previous Page | Next Page
Go to Page 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190

Search this thread

Show all threads

Reply to this thread:

User Name Tags:

bold: [b]bold[/b]
italics: [i]italics[/i]
emphasis: [em]emphasis[/em]
underline: [u]underline[/u]
small: [small]small[/small]
Link: [url=http://www.google.com]Link[/url]

[img=https://www.hcs64.com/images/mm1.png]
Password
Subject
Message

HCS Forum Index
Halley's Comet Software
forum source
Generated in 0.0275s;