Nothing
testthat::test_that("R4VN Playground translations are available", {
testthat::expect_identical(.r4fun_text("life", "en"), "Life Clock")
testthat::expect_identical(.r4fun_text("life", "vi"), "\u0110\u1ED3ng h\u1ED3 cu\u1ED9c s\u1ED1ng")
testthat::expect_true(nzchar(.r4fun_text("memory", "vi")))
})
testthat::test_that("memory sequences become longer with level", {
set.seed(1)
testthat::expect_length(.r4fun_memory_sequence(1), 3)
testthat::expect_length(.r4fun_memory_sequence(5), 7)
testthat::expect_length(.r4fun_memory_sequence(20), 14)
})
testthat::test_that("maze walls are reciprocal", {
set.seed(1)
m <- .r4fun_maze_generate(8)
n <- m$n
for (r in seq_len(n)) {
for (c in seq_len(n)) {
if (r < n) testthat::expect_identical(m$south[r, c], m$north[r + 1L, c])
if (c < n) testthat::expect_identical(m$east[r, c], m$west[r, c + 1L])
}
}
})
testthat::test_that("lights toggle changes the selected cross", {
b <- matrix(FALSE, 4, 4)
z <- .r4fun_light_toggle(b, 2, 2)
testthat::expect_equal(sum(z), 5)
testthat::expect_true(z[2, 2])
testthat::expect_true(z[1, 2])
testthat::expect_true(z[3, 2])
testthat::expect_true(z[2, 1])
testthat::expect_true(z[2, 3])
})
testthat::test_that("mastermind scoring works", {
testthat::expect_equal(unname(.r4fun_mastermind_score(c(1,2,3,4), c(1,2,3,4))), c(4,0))
testthat::expect_equal(unname(.r4fun_mastermind_score(c(1,2,3,4), c(4,3,2,1))), c(0,4))
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.