Help needed to create game

gavinkelly

Board Regular
Joined
Jan 12, 2008
Messages
220
I am trying to create a game i am unsure of the name but it is played on a 10centimeter square grid and 2 opponents take it in turns to draw a single centimeter line on the grid. if an player makes a full square he writes his initial in the square takes another go.
When all the possible lines have been drawn by each player the player with the most initals on the board wins.

So far i have created it for a 2 by 2 grid but if i use this method for a larger grid (e.g.) a 10 by 10 grid it will take me a long long time to write it out and the program will loop more an more times to find an un used line on the grid towards the end of the game (This is because in a 2 by 2 grid there are 12 possible "moves" but each time the computer moves it generates a random number from 1-12 and then checks to see if that move is already taken, if it is taken it generates another random number between 1-12 until it finds a free space. This brute force method will just take far too long as the grid gets larger. I will add AI later but for now can anyone help with this first problem. The code is as follows (sorry it is pretty long but very repetitive)

Code:
Sub CompGo()
Zero:
'i draw first line then computer choses a line
n = 12
Dim MyValue

For Z = 1 To 10000

MyValue = Int((n * Rnd) + 1)
Select Case MyValue
Case 1
If Cells(2, 2).Borders(xlEdgeLeft).LineStyle = xlContinuous Then
GoTo Handler
End If
 Cells(2, 2).Borders(xlEdgeLeft).LineStyle = xlContinuous
 Exit For

Case 2
If Cells(2, 2).Borders(xlEdgeTop).LineStyle = xlContinuous Then
GoTo Handler
End If
 Cells(2, 2).Borders(xlEdgeTop).LineStyle = xlContinuous
 Exit For


Case 3
If Cells(2, 2).Borders(xlEdgeRight).LineStyle = xlContinuous Then
GoTo Handler
End If
 Cells(2, 2).Borders(xlEdgeRight).LineStyle = xlContinuous
 Exit For

Case 4
If Cells(2, 2).Borders(xlEdgeBottom).LineStyle = xlContinuous Then
GoTo Handler
End If
 Cells(2, 2).Borders(xlEdgeBottom).LineStyle = xlContinuous
 Exit For

Case 5
If Cells(2, 3).Borders(xlEdgeTop).LineStyle = xlContinuous Then
GoTo Handler
End If
 Cells(2, 3).Borders(xlEdgeTop).LineStyle = xlContinuous
 Exit For

Case 6
If Cells(2, 3).Borders(xlEdgeRight).LineStyle = xlContinuous Then
GoTo Handler
End If
 Cells(2, 3).Borders(xlEdgeRight).LineStyle = xlContinuous
 Exit For

Case 7
If Cells(2, 3).Borders(xlEdgeBottom).LineStyle = xlContinuous Then
GoTo Handler
End If
 Cells(2, 3).Borders(xlEdgeBottom).LineStyle = xlContinuous
 Exit For

Case 8
If Cells(3, 2).Borders(xlEdgeLeft).LineStyle = xlContinuous Then
GoTo Handler
End If
 Cells(3, 2).Borders(xlEdgeLeft).LineStyle = xlContinuous
 Exit For

Case 9
If Cells(3, 2).Borders(xlEdgeBottom).LineStyle = xlContinuous Then
GoTo Handler
End If
 Cells(3, 2).Borders(xlEdgeBottom).LineStyle = xlContinuous
 Exit For

Case 10
If Cells(3, 2).Borders(xlEdgeRight).LineStyle = xlContinuous Then
GoTo Handler
End If
 Cells(3, 2).Borders(xlEdgeRight).LineStyle = xlContinuous
 Exit For

Case 11
If Cells(3, 3).Borders(xlEdgeRight).LineStyle = xlContinuous Then
GoTo Handler
End If
 Cells(3, 3).Borders(xlEdgeRight).LineStyle = xlContinuous
 Exit For

Case 12
 Cells(3, 3).Borders(xlEdgeBottom).LineStyle = xlContinuous

If Cells(3, 3).Borders(xlEdgeBottom).LineStyle = xlContinuous Then
GoTo Handler
End If
 Cells(3, 3).Borders(xlEdgeBottom).LineStyle = xlContinuous
 Exit For

End Select
Handler:

Next Z
M = 0
If IsEmpty(Cells(2, 2)) Then
    If Cells(2, 2).Borders(xlEdgeRight).LineStyle = xlContinuous And Cells(2, 2).Borders(xlEdgeLeft).LineStyle = xlContinuous And Cells(2, 2).Borders(xlEdgeTop).LineStyle = xlContinuous And Cells(2, 2).Borders(xlEdgeBottom).LineStyle = xlContinuous Then
    Cells(2, 2) = "C"
    M = 1
    End If
End If

If IsEmpty(Cells(2, 3)) Then
    If Cells(2, 3).Borders(xlEdgeRight).LineStyle = xlContinuous And Cells(2, 3).Borders(xlEdgeLeft).LineStyle = xlContinuous And Cells(2, 3).Borders(xlEdgeTop).LineStyle = xlContinuous And Cells(2, 3).Borders(xlEdgeBottom).LineStyle = xlContinuous Then
    Cells(2, 3) = "C"
    M = 1
    End If
End If

If IsEmpty(Cells(3, 2)) Then
    If Cells(3, 2).Borders(xlEdgeRight).LineStyle = xlContinuous And Cells(3, 2).Borders(xlEdgeLeft).LineStyle = xlContinuous And Cells(3, 2).Borders(xlEdgeTop).LineStyle = xlContinuous And Cells(3, 2).Borders(xlEdgeBottom).LineStyle = xlContinuous Then
    Cells(3, 2) = "C"
    M = 1
    End If
End If

If IsEmpty(Cells(3, 3)) Then
    If Cells(3, 3).Borders(xlEdgeRight).LineStyle = xlContinuous And Cells(3, 3).Borders(xlEdgeLeft).LineStyle = xlContinuous And Cells(3, 3).Borders(xlEdgeTop).LineStyle = xlContinuous And Cells(3, 3).Borders(xlEdgeBottom).LineStyle = xlContinuous Then
    Cells(3, 3) = "C"
    M = 1
    End If
End If
 If M = 1 Then
 GoTo Zero:
 End If




End Sub
Sub MyGo()
n = 0
If IsEmpty(Cells(2, 2)) Then
    If Cells(2, 2).Borders(xlEdgeRight).LineStyle = xlContinuous And Cells(2, 2).Borders(xlEdgeLeft).LineStyle = xlContinuous And Cells(2, 2).Borders(xlEdgeTop).LineStyle = xlContinuous And Cells(2, 2).Borders(xlEdgeBottom).LineStyle = xlContinuous Then
    Cells(2, 2) = "G"
    n = 1
    End If
End If

If IsEmpty(Cells(2, 3)) Then
    If Cells(2, 3).Borders(xlEdgeRight).LineStyle = xlContinuous And Cells(2, 3).Borders(xlEdgeLeft).LineStyle = xlContinuous And Cells(2, 3).Borders(xlEdgeTop).LineStyle = xlContinuous And Cells(2, 3).Borders(xlEdgeBottom).LineStyle = xlContinuous Then
    Cells(2, 3) = "G"
    n = 1
    End If
End If

If IsEmpty(Cells(3, 2)) Then
    If Cells(3, 2).Borders(xlEdgeRight).LineStyle = xlContinuous And Cells(3, 2).Borders(xlEdgeLeft).LineStyle = xlContinuous And Cells(3, 2).Borders(xlEdgeTop).LineStyle = xlContinuous And Cells(3, 2).Borders(xlEdgeBottom).LineStyle = xlContinuous Then
    Cells(3, 2) = "G"
    n = 1
    End If
End If

If IsEmpty(Cells(3, 3)) Then
    If Cells(3, 3).Borders(xlEdgeRight).LineStyle = xlContinuous And Cells(3, 3).Borders(xlEdgeLeft).LineStyle = xlContinuous And Cells(3, 3).Borders(xlEdgeTop).LineStyle = xlContinuous And Cells(3, 3).Borders(xlEdgeBottom).LineStyle = xlContinuous Then
    Cells(3, 3) = "G"
    n = 1
    End If
End If

If n = 1 Then
MsgBox ("Take another go")

Else
Call CompGo
End If

End Sub
 
I had my play today with this :-)
A border is added around the playground.
I enhanced the existing code and added some funny stuff - especially through the eyes of children -
check out for yourself


SQUARES 080708


it is open source code
you can look at it and take parts if you want

CAVEAT
Download the file
Do not try to play online: that won't work!
 
Upvote 0

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
I love it! Will that sponge do dishes? My kids are playing it now instead of doing the dishes...
 
Upvote 0
I love it! Will that sponge do dishes? My kids are playing it now instead of doing the dishes...

haha, I was even considering to create an add-in
"Slow Excel"
Everytime you clear something the sponge would do it.
When you change the color, a brush would come and paint it for you
When typing, the characters would be drawn.
Do you get the picture :biggrin:

back to topic
you could add some random events happening or make the scoreboard two cars on a track at the bottom or ...... too much ideas

hmmm... WHO HAS SOME IDEAS ABOUT THE ARTIFICIAL INTELLIGENCE?
 
Upvote 0
NOTE FOR TESTERS:

1.
Format the playground as "General"
2.
In Module1, procedure "NewGame"
disable the line
Code:
.NumberFormat = ";;;"

then you can see what happens and get some ideas about the Artificial Intelligence
within the code: 1, 2, 4, 8 can be replaced by 1, 1, 1, 1
if that makes things easier: still not sure: didn't think about it

<TABLE style="WIDTH: 130pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=170 border=0 x:str><COLGROUP><COL style="WIDTH: 13pt; mso-width-source: userset; mso-width-alt: 621" span=10 width=17><TBODY><TR style="HEIGHT: 12.75pt; mso-height-source: userset" height=17><TD class=xl24 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 13pt; BORDER-BOTTOM: #c0c0c0; HEIGHT: 12.75pt; BACKGROUND-COLOR: #ffff99" width=17 height=17 x:num>12</TD><TD class=xl25 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: #c0c0c0; WIDTH: 13pt; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99" width=17 x:num>8</TD><TD class=xl25 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: #c0c0c0; WIDTH: 13pt; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99" width=17 x:num>8</TD><TD class=xl25 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: #c0c0c0; WIDTH: 13pt; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99" width=17 x:num>8</TD><TD class=xl26 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: #c0c0c0; WIDTH: 13pt; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99" width=17 x:num>8</TD><TD class=xl25 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: #c0c0c0; WIDTH: 13pt; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99" width=17 x:num>8</TD><TD class=xl25 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: #c0c0c0; WIDTH: 13pt; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99" width=17 x:num>8</TD><TD class=xl25 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: #c0c0c0; WIDTH: 13pt; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99" width=17 x:num>8</TD><TD class=xl25 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: #c0c0c0; WIDTH: 13pt; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99" width=17 x:num>8</TD><TD class=xl27 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: #c0c0c0; WIDTH: 13pt; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99" width=17 x:num>9</TD></TR><TR style="HEIGHT: 12.75pt; mso-height-source: userset" height=17><TD class=xl28 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #c0c0c0; HEIGHT: 12.75pt; BACKGROUND-COLOR: #ffff99" height=17 x:num>4</TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; WIDTH: 13pt; BORDER-BOTTOM: #c0c0c0; HEIGHT: 12.75pt; BACKGROUND-COLOR: #ffff99" width=17 height=17><?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /><v:line id=MyLine style="Z-INDEX: 3; VISIBILITY: hidden; POSITION: absolute; rotation: 90" o:insetmode="auto" strokeweight=".5pt" strokecolor="windowText [64]" to="18.75pt,18.75pt" from="6.75pt,18.75pt" o:spid="_x0000_s1042"></v:line></TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl30 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl33 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: #ffff99" x:num>2</TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl31 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99" x:num>1</TD></TR><TR style="HEIGHT: 12.75pt; mso-height-source: userset" height=17><TD class=xl28 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #c0c0c0; HEIGHT: 12.75pt; BACKGROUND-COLOR: #ffff99" height=17 x:num>4</TD><TD class=xl31 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99" x:num>1</TD><TD class=xl38 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: #c0c0c0; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: #ffff99" x:num>7</TD><TD class=xl28 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: windowtext; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99" x:num>4</TD><TD class=xl30 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl35 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: windowtext; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: #ffff99" x:num>10</TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl31 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99" x:num>1</TD></TR><TR style="HEIGHT: 12.75pt; mso-height-source: userset" height=17><TD class=xl28 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #c0c0c0; HEIGHT: 12.75pt; BACKGROUND-COLOR: #ffff99" height=17 x:num>4</TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl25 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: windowtext; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99" x:num>8</TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl33 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: #ffff99" x:num>2</TD><TD class=xl25 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: windowtext; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99" x:num>8</TD><TD class=xl33 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: #ffff99" x:num>2</TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl31 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99" x:num>1</TD></TR><TR style="HEIGHT: 12.75pt; mso-height-source: userset" height=17><TD class=xl28 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #c0c0c0; HEIGHT: 12.75pt; BACKGROUND-COLOR: #ffff99" height=17 x:num>4</TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl35 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: windowtext; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: #ffff99" x:num>10</TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl37 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: #ffff99" x:num>11</TD><TD class=xl28 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: windowtext; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99" x:num>4</TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl31 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99" x:num>1</TD></TR><TR style="HEIGHT: 12.75pt; mso-height-source: userset" height=17><TD class=xl28 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #c0c0c0; HEIGHT: 12.75pt; BACKGROUND-COLOR: #ffff99" height=17 x:num>4</TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl27 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99" x:num>9</TD><TD class=xl36 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: #c0c0c0; BORDER-LEFT: windowtext; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99" x:num>5</TD><TD class=xl24 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99" x:num>12</TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl31 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99" x:num>1</TD></TR><TR style="HEIGHT: 12.75pt; mso-height-source: userset" height=17><TD class=xl28 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #c0c0c0; HEIGHT: 12.75pt; BACKGROUND-COLOR: #ffff99" height=17 x:num>4</TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl34 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: #ffff99" x:num>3</TD><TD class=xl28 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: windowtext; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99" x:num>4</TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl31 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99" x:num>1</TD></TR><TR style="HEIGHT: 12.75pt; mso-height-source: userset" height=17><TD class=xl28 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #c0c0c0; HEIGHT: 12.75pt; BACKGROUND-COLOR: #ffff99" height=17 x:num>4</TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl25 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: windowtext; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99" x:num>8</TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl31 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99" x:num>1</TD></TR><TR style="HEIGHT: 12.75pt; mso-height-source: userset" height=17><TD class=xl28 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #c0c0c0; HEIGHT: 12.75pt; BACKGROUND-COLOR: #ffff99" height=17 x:num>4</TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl29 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99"></TD><TD class=xl31 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: #ffff99" x:num>1</TD></TR><TR style="HEIGHT: 12.75pt; mso-height-source: userset" height=17><TD class=xl32 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: #ffff99" height=17 x:num>6</TD><TD class=xl33 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: #ffff99" x:num>2</TD><TD class=xl33 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: #ffff99" x:num>2</TD><TD class=xl33 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: #ffff99" x:num>2</TD><TD class=xl33 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: #ffff99" x:num>2</TD><TD class=xl33 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: #ffff99" x:num>2</TD><TD class=xl33 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: #ffff99" x:num>2</TD><TD class=xl33 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: #ffff99" x:num>2</TD><TD class=xl33 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: #ffff99" x:num>2</TD><TD class=xl34 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: #ffff99" x:num>3</TD></TR></TBODY></TABLE>
 
Last edited:
Upvote 0
today I concentrated on the Artificial Intelligence
made a formula + UDF system
It is ready and I think it will work but now I need to put it in the game

also made a track with to cars to show the score :-)
I think this will indeed be a game for children

any one else working on this?
Gavin?
 
Upvote 0
ANYONE ELSE? GAVIN, where are you?

Anyway, it is quite amusing to play with this. One of my favorite things is to use stuff, where it isn't designed for ;)
Still struggling with some other strange acting User Defined Functions. The workaround will be quite simple, but I prefer to attack the real problem.
The entire game is played in about 20 seconds: computer against computer. (if the strange bugs will go away)
 
Upvote 0
SQUARES 080711

it was a joy to play around
download it to know what I mean :biggrin:

Still not well protected: you can do dumb things while code is running. That part will be for a next version.

The artificial intelligence is quite OK, but predictable. Only thing to add is to choose the correct location when a "forced" line is to be made: when you play the game, you will notice that the "forced" line has to be put in the most little "enclosed area". Once that will be added, the AI will be quite perfect (compared to the insight I have now: so I mean that the AI would be as strong as me, even stronger because AI has no concentration problems)

AI is built on a formulasystem, but now I know how to do it with a fast function: that will be for another time ... I am sure that it will be fast, thanks to the 1, 2, 4, 8 system.

After Tom's remark about his children I added plenty of little surprises.
Can't remember if the racecars (= scoreboard) were already there in previous version

If somebody has some funny stuff ideas, they are welcome.

SQUARES 080711
 
Upvote 0

Forum statistics

Threads
1,223,240
Messages
6,170,951
Members
452,368
Latest member
jayp2104

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top