informalr / snackman

Fun game inspired by Pacman with shrinking and growing features
GNU Affero General Public License v3.0
0 stars 1 forks source link

Create an Action R6 class #31

Closed richelbilderbeek closed 3 years ago

richelbilderbeek commented 3 years ago

Create an Action R6 class. It is fine if it has many member variables, as long as function as create_action_player_left keep working.

Below is the function-only Issue, before moving to R6:

Due to the need of states and actions, we use an architecture in which a player moves by doing an action. Add some actions

test_that("create", {
  skip("Issue 31. Issue #31")
  expect_silent(Action$new("player_left"))
  expect_silent(Action$new("player_right"))
})

test_that("player_left action", {
  skip("Issue 31. Issue #31")
  action_player_left <- Action$new("player_left")
  expect_equal(action_player_left$type, "player_left")
})

test_that("player_right action", {
  action_player_right <- Action$new("player_right")
  expect_equal(action_player_right$type, "player_right")
})
richelbilderbeek commented 3 years ago

AFAICS @FrieseWoudloper is working on this. Am I correct?