Switch to 'busted' for testing

Update version, Unify add and remove methods for World
Fix small bugs
This commit is contained in:
bakpakin
2015-03-29 11:19:22 +08:00
parent 5b4acb55ee
commit 26ecc4f0a5
4 changed files with 272 additions and 223 deletions
+4 -5
View File
@@ -46,6 +46,7 @@ local Aspect = jojo.Aspect
local System = jojo.System
local personAspect = Aspect({"name", "mass", "phrase"})
local talkingSystem = System(
nil,
function (p, delta)
@@ -55,8 +56,6 @@ local talkingSystem = System(
personAspect
)
local world = World(talkingSystem)
local joe = {
name = "Joe",
phrase = "I'm a plumber.",
@@ -64,7 +63,7 @@ local joe = {
hairColor = "brown"
}
world:add(joe)
local world = World(talkingSystem, joe)
for i = 1, 20 do
world:update(1)
@@ -72,8 +71,8 @@ end
```
## Testing ##
To test Jojo, simply clone the project, cd into the project directory, and
run `lua jojotest.lua` from command line.
Jojo uses [busted](http://olivinelabs.com/busted/) for testing. Install and run
`busted` from the command line to test.
## TODO ##