WIP minetest <-> laby import/export
- currently possible to export a laby into minetest - start of a lua content parser to import .we into lab
This commit is contained in:
32
java/org/artisanlogiciel/lua/CharProvider.java
Normal file
32
java/org/artisanlogiciel/lua/CharProvider.java
Normal file
@@ -0,0 +1,32 @@
|
||||
package org.artisanlogiciel.lua;
|
||||
|
||||
public class CharProvider {
|
||||
|
||||
String input;
|
||||
int current;
|
||||
|
||||
public CharProvider(String input) {
|
||||
this.input = input;
|
||||
current = 0;
|
||||
}
|
||||
|
||||
public char getNextchar()
|
||||
{
|
||||
int i = current;
|
||||
if ( input.length() > current) {
|
||||
current++;
|
||||
return input.charAt(i);
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void pushBackChar(char c)
|
||||
{
|
||||
System.out.print('*');
|
||||
current--;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user