Skip to content

Commit

Permalink
4stAttack-2.1.1.tar.gz
Browse files Browse the repository at this point in the history
2002-09-20 16:16:16 GMT
  • Loading branch information
Jeroen Vloothuis authored and 3D1T0R committed Nov 3, 2018
1 parent 0800051 commit dfb4c64
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 51 deletions.
4 changes: 0 additions & 4 deletions gui/.cvsignore

This file was deleted.

90 changes: 45 additions & 45 deletions scoremap.py
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
from random import *

# This class is a score map used by some of the ai players
class ScoreMap:

def __init__(self):
""" New and `improved'"""
self.scoremap = [
[3,4,5,7,5,4,3],
[4,6,8,10,8,6,4],
[5,8,12,13,12,8,5],
[5,8,12,13,12,8,5],
[4,6,8,10,8,6,4],
[3,4,5,7,5,4,3]
]

# Get the score for a single stone
def getStoneScore(self, x, y):
# Reverse the x and y because the map is in a human readable form:
# 6 x 7 horizontal array's
return self.scoremap[y][x]

# Get the score for a single stone
def setStoneScore(self, x, y, value):
# Reverse the x and y because the map is in a human readable form:
# 6 x 7 horizontal array's
self.scoremap[y][x] = value

# These are not implemented, there was no need for them anymore...yet?
def loadScoreMap(file_name):
return 0

def saveScoreMap(file_name):
return 0

def updateScoreMap(board, player, win):
return 0

def randomizeMap(self):
x_center = int (random()*5)
y_center = int (random()*4)
for x in [-1,0,1]:
for y in [-1,0,1]:
self.scoremap[y+y_center][x+x_center] = + int(random()*2)
from random import *

# This class is a score map used by some of the ai players
class ScoreMap:

def __init__(self):
""" New and `improved'"""
self.scoremap = [
[3,4,5,7,5,4,3],
[4,6,8,10,8,6,4],
[5,8,12,13,12,8,5],
[5,8,12,13,12,8,5],
[4,6,8,10,8,6,4],
[3,4,5,7,5,4,3]
]

# Get the score for a single stone
def getStoneScore(self, x, y):
# Reverse the x and y because the map is in a human readable form:
# 6 x 7 horizontal array's
return self.scoremap[y][x]

# Get the score for a single stone
def setStoneScore(self, x, y, value):
# Reverse the x and y because the map is in a human readable form:
# 6 x 7 horizontal array's
self.scoremap[y][x] = value

# These are not implemented, there was no need for them anymore...yet?
def loadScoreMap(file_name):
return 0

def saveScoreMap(file_name):
return 0

def updateScoreMap(board, player, win):
return 0

def randomizeMap(self):
x_center = int (random()*5)
y_center = int (random()*4)
for x in [-1,0,1]:
for y in [-1,0,1]:
self.scoremap[y+y_center][x+x_center] = + int(random()*2)

2 changes: 1 addition & 1 deletion settingsscreen.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import gui
#import gui
import pygame
from quit import *
from game import *
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1
2.1.1

0 comments on commit dfb4c64

Please sign in to comment.