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
// Playground code link - https://pl.kotl.in/8XKnzisvF | |
/** | |
* You can edit, run, and share this code. | |
* play.kotlinlang.org | |
*/ | |
fun main() { | |
val tim = Player(name="Tim",level=4,lives=8) | |
val louise = Player("Louise",2,5,1000) |
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
let nodes = []; | |
let nodesBegin = []; | |
let nodesEnd = []; | |
let nodesDist = []; | |
let paths = []; | |
let filtered = []; | |
let exponent = 4; // Determines the curve | |
let x = 0.0; // Current x-coordinate | |
let y = 0.0; // Current y-coordinate |
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
let nodes=[]; | |
function setup() { | |
createCanvas(600, 400); | |
const numNodes = 3; | |
for(let i=0;i<numNodes;i++) | |
nodes.push(new Node()); | |
} | |
function draw() { | |
nodes.forEach((node,idx) => { |
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
const done = false; | |
let moveX1 = 1; | |
let moveX2 = 1; | |
const recWidthPad=20+2; | |
function setup() { | |
createCanvas(600, 400); | |
noStroke(); | |
} |