aritmetics
This commit is contained in:
parent
f84705b67d
commit
5575c491a1
@ -0,0 +1,13 @@
|
|||||||
|
package p.studio.compiler;
|
||||||
|
|
||||||
|
import p.studio.compiler.messages.BuilderPipelineConfig;
|
||||||
|
import p.studio.compiler.workspaces.BuilderPipelineService;
|
||||||
|
import p.studio.utilities.logs.LogAggregator;
|
||||||
|
|
||||||
|
public class Compile {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
final var logAggregator = LogAggregator.stdout();
|
||||||
|
final var config = new BuilderPipelineConfig(false, "test-projects/main");
|
||||||
|
BuilderPipelineService.INSTANCE.run(config, logAggregator);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -3,8 +3,29 @@ import { Input } from @sdk:input;
|
|||||||
|
|
||||||
fn frame() -> void
|
fn frame() -> void
|
||||||
{
|
{
|
||||||
|
let a = 10;
|
||||||
|
let b = 15;
|
||||||
|
let total = a + b;
|
||||||
|
|
||||||
if (Input.pad().a().pressed())
|
if (Input.pad().a().pressed())
|
||||||
{
|
{
|
||||||
Log.debug("Hello World!");
|
total += 25;
|
||||||
}
|
}
|
||||||
}
|
else if (Input.pad().b().pressed())
|
||||||
|
{
|
||||||
|
total += 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (total == 30)
|
||||||
|
{
|
||||||
|
Log.info("30 is the magic number!");
|
||||||
|
}
|
||||||
|
else if (total == 50)
|
||||||
|
{
|
||||||
|
Log.error("50 is the magic number!");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Log.warn("The magic number is neither 30 nor 50!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user