Skip to content

Commit 08eea8f

Browse files
committed
Merge branch 'release-1.0.0'
2 parents 99ccfd0 + 603bf8d commit 08eea8f

24 files changed

Lines changed: 1575 additions & 638 deletions

.gitignore

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
11
img/UV/
22
img/UV/*
3-
PrivateScenarioWriter.py
3+
img/SKA/
4+
img/SKA/*
5+
6+
logo.png
7+
48
scenarios/UV.scibot
9+
scenarios/SKA.scibot
10+
11+
scenarioWriters/ScenarioWriterUV.py
12+
scenarioWriters/ScenarioWriterSKA.py
13+
14+
scenarios.zip
15+
516
*.pyc
617
*Thumbs.db
7-
pyg.exe.log
8-
runSciBot.log
18+
19+
runSciBot.log
20+
runSciBot.exe

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
# SciBot
22
contact: scibot-dev@googlegroups.com
3-
##To Run
43

5-
1. Download the zip (https://github.com/gregcorbett/SciBot/archive/master.zip)
6-
2. Extract the zip
7-
3. Open up cmd
8-
4. navigate to unzipped files
9-
5. Either:
10-
1. run `python runSciBot.py`
11-
* see requirements section below
12-
2. double click `runSciBot.exe`
4+
##Users
5+
1. Go to https://github.com/gregcorbett/SciBot/releases/latest
6+
2. Download runSciBot.exe and scenarios.zip into the same place
7+
3. Unzip scenarios.zip
8+
3. Run the .exe file (by double clicking it.)
139

14-
##Image Sources
15-
SciBot image sourced from: https://www.tes.co.uk/teaching-resource/bee-bot-sequence-powerpoint-6415227
10+
##Developers
11+
12+
Download the soucre.zip, unzip it and navigate to the source code directory
1613

17-
##Requirements for building and developing SciBot
14+
###Requirements for building and developing SciBot
1815

1916
Microsoft installers have been linked for each requirement for easy of installation.
2017

2118
1. Python, 3.4 or higher (https://www.python.org/downloads/)
2219
* exact version used in testing ( https://www.python.org/ftp/python/3.4.3/python-3.4.3.msi)
23-
2. Pygame, 1.9.2 or higher (https://www.python.org/downloads/)
24-
* exact version used in testing (http://pygame.org/ftp/pygame-1.9.2a0.win32-py3.2.msi)
20+
2. Pygame, 1.9.2 or higher (https://bitbucket.org/pygame/pygame/downloads)
21+
* exact version used in testing (https://bitbucket.org/pygame/pygame/downloads/pygame-1.9.2a0-hg_ea3b3bb8714a.win32-py3.4.msi)
2522
3. py2exe 0.9.2.2 (https://pypi.python.org/pypi/py2exe/)
2623
* exact version used in testing (https://pypi.python.org/packages/any/p/py2exe/py2exe-0.9.2.2.win32.exe)
2724

28-
##Building the exe file
25+
###Building the exe file
2926

30-
After the requirements below are met, open a command line and navigate to the unzipped directory.
27+
After the requirements above are met, open a command line and navigate to the unzipped directory.
3128

32-
Run `python build.py py2exe`.
29+
Run `python setup.py py2exe`.
30+
31+
##Image Sources
32+
SciBot image sourced from: https://www.tes.co.uk/teaching-resource/bee-bot-sequence-powerpoint-6415227

ScenarioWriter.py

Lines changed: 0 additions & 29 deletions
This file was deleted.

build.py

Lines changed: 0 additions & 14 deletions
This file was deleted.

img/Default/background.jpg

-8.7 KB
Loading

img/Default/obstacle1.jpg

-10.3 KB
Loading

runSciBot.exe

-15.5 MB
Binary file not shown.

runSciBot.py

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
import os
2-
import sys
3-
#print(os.getcwd()+"\..\scenarios")
4-
#sys.path.append(os.getcwd())
5-
#sys.path.append(os.getcwd()+"\..\scenarios")
6-
#sys.path.append(os.getcwd()+"\..\src")
7-
del os
8-
del sys
9-
10-
from src.GameWindow import *
11-
12-
gameWindow = GameWindow()
13-
gameWindow.chooseScenario()
14-
gameWindow.loadScenario()
15-
gameWindow.startScenario()
1+
"""This file runs the GameWindow."""
2+
3+
from src.GameWindow import GameWindow
4+
5+
6+
def main():
7+
"""Run the GameWindow."""
8+
gameWindow = GameWindow()
9+
gameWindow.start_rendering()
10+
gameWindow.start_logic()
11+
12+
if __name__ == "__main__":
13+
main()
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
"""This file writes a new scibot file."""
2+
3+
from src.Scenario import Scenario
4+
from src.BeeBot import Heading
5+
6+
7+
def main():
8+
"""Write a scibot file."""
9+
# Initalises a new scenario object and sets the scenario name.
10+
scenario = Scenario("Default")
11+
12+
# Tthe size of an individual square
13+
scenario.set_board_step(150)
14+
15+
# Sets the width of the map in terms of squares
16+
scenario.set_logical_width(5)
17+
# Sets the height of the map in terms of squares
18+
scenario.set_logical_height(8)
19+
20+
# Sets the bee bot starting square (x, y)
21+
scenario.set_beebot_start_position(3, 1)
22+
23+
# Set the beebot sprite
24+
scenario.set_beebot_sprite("./img/Default/robot.jpg")
25+
# Sets the beebots starting direction, where "UP" is "Heading.NORTH",
26+
# other options are Heading.East etc
27+
scenario.set_beebot_heading(Heading.NORTH)
28+
29+
# Sets the image on the map
30+
scenario.set_background("./img/Default/background.jpg")
31+
# If the image has no grid, one can be added by choosing a (R,G,B) tuple
32+
scenario.set_border_colour((0, 0, 0))
33+
34+
# This line addes an obstacle at square (2,1)
35+
# with sprite "./img/Default/obstacle1.jpg".
36+
# scenario.addObstacle(2,1) would add an obstacle at (2,1) with no sprite,
37+
# ie it will show whatever is on the background
38+
scenario.add_obstacle(2, 1, "./img/Default/obstacle1.jpg")
39+
# Add another obstacle
40+
scenario.add_obstacle(2, 3, "./img/Default/obstacle1.jpg")
41+
42+
# Adds a goal square at (1,2) with sprite "./img/Default/goal1.jpg"
43+
scenario.add_goal(1, 2, "./img/Default/goal1.jpg")
44+
# add another goal
45+
scenario.add_goal(2, 0, "./img/Default/goal1.jpg")
46+
47+
# This method means the goals must be met in the order added (Default)
48+
# scenario.set_ordered_goals(True)
49+
# This method means the goals can be met in any order
50+
scenario.set_ordered_goals(False)
51+
52+
# Sets the sprite to be displayed when the robot crashes
53+
scenario.set_beebot_fail_sprite("./img/Default/robotx.jpg")
54+
55+
# Copy the LICENSE from below into the Scenario
56+
scenario.set_license(LICENSE)
57+
58+
# Writes the scibot file
59+
scenario.write_to_file()
60+
61+
# Alter this to credit image sources
62+
LICENSE = """
63+
GNU GENERAL PUBLIC LICENSE
64+
Version 2, June 1991
65+
66+
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
67+
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
68+
Everyone is permitted to copy and distribute verbatim copies
69+
of this license document, but changing it is not allowed.
70+
71+
The full version of this license can be found here.
72+
https://github.com/gregcorbett/SciBot/blob/master/LICENSE
73+
74+
BeeBot image source.
75+
https://www.tes.co.uk/teaching-resource/bee-bot-sequence-powerpoint-6415227
76+
"""
77+
78+
if __name__ == "__main__":
79+
main()

scenarios/Default.scibot

58.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)