-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a "vertical slice" of the game, demonstrating start-to-finish gameplay. There is only one level, bubble sort. [ADDED] - Main menu with bogo sort, start, and credits buttons - Level select page with preview display, description and instructions - Scrolling credits screen with required license texts - Playing and end screens with time-based scoring and visual feedback
- Loading branch information
Showing
28 changed files
with
842 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
This project is made possible by open source projects; their required copyrights are listed below. | ||
|
||
# [Godot](https://godotengine.org) | ||
Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. Copyright (c) 2014-2020 Godot Engine contributors. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
# [FreeType](https://www.freetype.org) | ||
Portions of this software are copyright © 2019 The FreeType | ||
Project (www.freetype.org). All rights reserved. | ||
|
||
# [Hack](https://sourcefoundry.org/hack) | ||
The work in the Hack project is Copyright 2018 Source Foundry Authors and licensed under the MIT License | ||
|
||
The work in the DejaVu project was committed to the public domain. | ||
|
||
Bitstream Vera Sans Mono Copyright 2003 Bitstream Inc. and licensed under the Bitstream Vera License with Reserved Font Names "Bitstream" and "Vera" | ||
|
||
### MIT License | ||
|
||
Copyright (c) 2018 Source Foundry Authors | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
|
||
### BITSTREAM VERA LICENSE | ||
|
||
Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is a trademark of Bitstream, Inc. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated documentation files (the "Font Software"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright and trademark notices and this permission notice shall be included in all copies of one or more of the Font Software typefaces. | ||
|
||
The Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing either the words "Bitstream" or the word "Vera". | ||
|
||
This License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the "Bitstream Vera" names. | ||
|
||
The Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself. | ||
|
||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. | ||
|
||
Except as contained in this notice, the names of Gnome, the Gnome Foundation, and Bitstream Inc., shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Font Software without prior written authorization from the Gnome Foundation or Bitstream Inc., respectively. For further information, contact: fonts at gnome dot org. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,13 @@ | ||
# Human Computer Simulator | ||
*Gamifying computer science education* | ||
*Human Computer Simulator* is a game where you get to become your | ||
favorite algorithm and or data structure. | ||
|
||
# Screenshots | ||
![Level Select](assets/levels.png) | ||
|
||
# Download | ||
This software is in an alpha stage of development and I do not plan on | ||
releasing ready-to-run builds until a stable v1.0 release. However, it | ||
is very easy to run it yourself. Just grab the free and open source | ||
[Godot game engine](https://godotengine.org), import the `project.godot` | ||
file, and hit the play button. |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="StreamTexture" | ||
path="res://.import/icon.png-b6a7fb2db36edd3d95dc42f1dc8c1c5d.stex" | ||
metadata={ | ||
"vram_texture": false | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://assets/icon.png" | ||
dest_files=[ "res://.import/icon.png-b6a7fb2db36edd3d95dc42f1dc8c1c5d.stex" ] | ||
|
||
[params] | ||
|
||
compress/mode=0 | ||
compress/lossy_quality=0.7 | ||
compress/hdr_mode=0 | ||
compress/bptc_ldr=0 | ||
compress/normal_map=0 | ||
flags/repeat=0 | ||
flags/filter=true | ||
flags/mipmaps=false | ||
flags/anisotropic=false | ||
flags/srgb=2 | ||
process/fix_alpha_border=true | ||
process/premult_alpha=false | ||
process/HDR_as_SRGB=false | ||
process/invert_color=false | ||
stream=false | ||
size_limit=0 | ||
detect_3d=true | ||
svg/scale=1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"BUBBLE SORT": | ||
{ | ||
"about": "Bubble sort iterates through the array and looks at each pair of elements, swapping them if they are out of order. When it has gone through the entire array without swapping a single pair, it has finished. Though simple to understand, bubble sort is hopelessly inefficient on all but the smallest of arrays." | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="StreamTexture" | ||
path="res://.import/splash.png-8aa957744d9f4b764dd4680b37c88571.stex" | ||
metadata={ | ||
"vram_texture": false | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://assets/splash.png" | ||
dest_files=[ "res://.import/splash.png-8aa957744d9f4b764dd4680b37c88571.stex" ] | ||
|
||
[params] | ||
|
||
compress/mode=0 | ||
compress/lossy_quality=0.7 | ||
compress/hdr_mode=0 | ||
compress/bptc_ldr=0 | ||
compress/normal_map=0 | ||
flags/repeat=0 | ||
flags/filter=true | ||
flags/mipmaps=false | ||
flags/anisotropic=false | ||
flags/srgb=2 | ||
process/fix_alpha_border=true | ||
process/premult_alpha=false | ||
process/HDR_as_SRGB=false | ||
process/invert_color=false | ||
stream=false | ||
size_limit=0 | ||
detect_3d=true | ||
svg/scale=1.0 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
extends ComparisonSort | ||
class_name BogoSort | ||
|
||
func _init(array).(array): | ||
pass | ||
|
||
func check(action): | ||
return true | ||
|
||
func next(): | ||
array = ArrayModel.new(array.size) | ||
|
||
func emphasized(i): | ||
return false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
extends ComparisonSort | ||
class_name BubbleSort | ||
|
||
var swapped = false | ||
|
||
func _init(array).(array): | ||
pass | ||
|
||
func check(action): | ||
if array.get(index) > array.get(index + 1): | ||
return action == "swap" | ||
else: | ||
return action == "no_swap" | ||
|
||
func next(): | ||
if array.get(index) > array.get(index + 1): | ||
array.swap(index, index + 1) | ||
swapped = true | ||
index += 1 | ||
if index == array.size - 1: | ||
if not swapped: | ||
emit_signal("done") | ||
index = 0 | ||
swapped = false | ||
|
||
func emphasized(i): | ||
return i == index or i == index + 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
extends Node | ||
class_name ComparisonSort | ||
|
||
signal done | ||
signal mistake | ||
|
||
const ACTIONS = ["swap", "no_swap"] | ||
|
||
var array: ArrayModel | ||
var index = 0 | ||
var timer = Timer.new() | ||
var active = true | ||
|
||
func _init(array): | ||
self.array = array | ||
timer.one_shot = true | ||
timer.connect("timeout", self, "_on_Timer_timeout") | ||
add_child(timer) | ||
self.connect("mistake", self, "_on_ComparisonSort_mistake") | ||
|
||
func check(action): | ||
pass | ||
|
||
func next(): | ||
pass | ||
|
||
func _on_ComparisonSort_mistake(): | ||
active = false | ||
timer.start(1) | ||
|
||
func _on_Timer_timeout(): | ||
active = true | ||
|
||
func _input(event): | ||
if not active: | ||
return | ||
|
||
for action in ACTIONS: | ||
if event.is_action_pressed(action): | ||
if check(action): | ||
next() | ||
else: | ||
emit_signal("mistake") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
""" | ||
A plain old one-dimensional random access array. | ||
""" | ||
|
||
extends Reference | ||
class_name ArrayModel | ||
|
||
var array = [] | ||
var size | ||
|
||
func _init(size): | ||
for i in range(1, size + 1): | ||
array.append(i) | ||
array.shuffle() | ||
self.size = size | ||
|
||
func get(i): | ||
return array[i] | ||
|
||
func is_sorted(): | ||
for i in range(size - 1): | ||
if array[i] > array[i + 1]: | ||
return false | ||
return true | ||
|
||
func swap(i, j): | ||
var temp = array[i] | ||
array[i] = array[j] | ||
array[j] = temp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.