Skip to content

Commit

Permalink
Merge branch 'release-1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
gregcorbett committed Oct 16, 2016
2 parents 99ccfd0 + 603bf8d commit 08eea8f
Show file tree
Hide file tree
Showing 24 changed files with 1,575 additions and 638 deletions.
18 changes: 15 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
img/UV/
img/UV/*
PrivateScenarioWriter.py
img/SKA/
img/SKA/*

logo.png

scenarios/UV.scibot
scenarios/SKA.scibot

scenarioWriters/ScenarioWriterUV.py
scenarioWriters/ScenarioWriterSKA.py

scenarios.zip

*.pyc
*Thumbs.db
pyg.exe.log
runSciBot.log

runSciBot.log
runSciBot.exe
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
# SciBot
contact: [email protected]
##To Run

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

##Image Sources
SciBot image sourced from: https://www.tes.co.uk/teaching-resource/bee-bot-sequence-powerpoint-6415227
##Developers

Download the soucre.zip, unzip it and navigate to the source code directory

##Requirements for building and developing SciBot
###Requirements for building and developing SciBot

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

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

##Building the exe file
###Building the exe file

After the requirements below are met, open a command line and navigate to the unzipped directory.
After the requirements above are met, open a command line and navigate to the unzipped directory.

Run `python build.py py2exe`.
Run `python setup.py py2exe`.

##Image Sources
SciBot image sourced from: https://www.tes.co.uk/teaching-resource/bee-bot-sequence-powerpoint-6415227
29 changes: 0 additions & 29 deletions ScenarioWriter.py

This file was deleted.

14 changes: 0 additions & 14 deletions build.py

This file was deleted.

Binary file modified img/Default/background.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/Default/obstacle1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed runSciBot.exe
Binary file not shown.
28 changes: 13 additions & 15 deletions runSciBot.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import os
import sys
#print(os.getcwd()+"\..\scenarios")
#sys.path.append(os.getcwd())
#sys.path.append(os.getcwd()+"\..\scenarios")
#sys.path.append(os.getcwd()+"\..\src")
del os
del sys

from src.GameWindow import *

gameWindow = GameWindow()
gameWindow.chooseScenario()
gameWindow.loadScenario()
gameWindow.startScenario()
"""This file runs the GameWindow."""

from src.GameWindow import GameWindow


def main():
"""Run the GameWindow."""
gameWindow = GameWindow()
gameWindow.start_rendering()
gameWindow.start_logic()

if __name__ == "__main__":
main()
79 changes: 79 additions & 0 deletions scenarioWriters/ScenarioWriterDefault.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
"""This file writes a new scibot file."""

from src.Scenario import Scenario
from src.BeeBot import Heading


def main():
"""Write a scibot file."""
# Initalises a new scenario object and sets the scenario name.
scenario = Scenario("Default")

# Tthe size of an individual square
scenario.set_board_step(150)

# Sets the width of the map in terms of squares
scenario.set_logical_width(5)
# Sets the height of the map in terms of squares
scenario.set_logical_height(8)

# Sets the bee bot starting square (x, y)
scenario.set_beebot_start_position(3, 1)

# Set the beebot sprite
scenario.set_beebot_sprite("./img/Default/robot.jpg")
# Sets the beebots starting direction, where "UP" is "Heading.NORTH",
# other options are Heading.East etc
scenario.set_beebot_heading(Heading.NORTH)

# Sets the image on the map
scenario.set_background("./img/Default/background.jpg")
# If the image has no grid, one can be added by choosing a (R,G,B) tuple
scenario.set_border_colour((0, 0, 0))

# This line addes an obstacle at square (2,1)
# with sprite "./img/Default/obstacle1.jpg".
# scenario.addObstacle(2,1) would add an obstacle at (2,1) with no sprite,
# ie it will show whatever is on the background
scenario.add_obstacle(2, 1, "./img/Default/obstacle1.jpg")
# Add another obstacle
scenario.add_obstacle(2, 3, "./img/Default/obstacle1.jpg")

# Adds a goal square at (1,2) with sprite "./img/Default/goal1.jpg"
scenario.add_goal(1, 2, "./img/Default/goal1.jpg")
# add another goal
scenario.add_goal(2, 0, "./img/Default/goal1.jpg")

# This method means the goals must be met in the order added (Default)
# scenario.set_ordered_goals(True)
# This method means the goals can be met in any order
scenario.set_ordered_goals(False)

# Sets the sprite to be displayed when the robot crashes
scenario.set_beebot_fail_sprite("./img/Default/robotx.jpg")

# Copy the LICENSE from below into the Scenario
scenario.set_license(LICENSE)

# Writes the scibot file
scenario.write_to_file()

# Alter this to credit image sources
LICENSE = """
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
The full version of this license can be found here.
https://github.com/gregcorbett/SciBot/blob/master/LICENSE
BeeBot image source.
https://www.tes.co.uk/teaching-resource/bee-bot-sequence-powerpoint-6415227
"""

if __name__ == "__main__":
main()
Binary file modified scenarios/Default.scibot
Binary file not shown.
15 changes: 15 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"""This file creates the exe file."""

from distutils.core import setup
import py2exe

setup(
windows=['runSciBot.py'],
options={
"py2exe": {
"bundle_files": 0,
"dist_dir": "."
},
},
zipfile=None,
)
Loading

0 comments on commit 08eea8f

Please sign in to comment.