Skip to content

Commit

Permalink
ezrSquared prerelease-1.5.1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Uralstech committed Mar 25, 2023
1 parent 59b9d1c commit b8d2888
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 6 deletions.
3 changes: 3 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
CHANGELOG - What's new?

* prerelease-1.5.1.0.1 - [25-03-23]
* Fixed bug in special function `equals`

* prerelease-1.5.1.0.0 - [23-03-23]
* "all" keyword and ',' symbol now interchangeable in normal and QuickSyntax `include` expressions

Expand Down
2 changes: 1 addition & 1 deletion Classes/Values.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2747,7 +2747,7 @@ public override bool ItemEquals(item obj, out error? error)
item? func = internalContext.symbolTable.get("equals");
if (func != null && func is special)
{
item? output = getOutput(func, new item[0], out error);
item? output = getOutput(func, new item[1] { obj }, out error);
if (error != null) return false;
return output.isTrue(out error);
}
Expand Down
4 changes: 2 additions & 2 deletions Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ namespace ezrSquared.Constants
{
public static class constants
{
public const string VERSION = "prerelease-1.5.1.0.0";
public const string VERSION_DATE = "23.03.2023";
public const string VERSION = "prerelease-1.5.1.0.1";
public const string VERSION_DATE = "25.03.2023";

public static readonly string[] KEYWORDS = { "item", "and", "or", "invert", "if", "else", "do", "count", "from", "as", "to", "step", "while", "function", "special", "with", "end", "return", "skip", "stop", "try", "error", "in", "object", "global", "include", "all" };
public static readonly string[] QEYWORDS = { "f", "l", "e", "c", "t", "n", "w", "fd", "sd", "od", "i", "s", "d", "g", "v" };
Expand Down
2 changes: 1 addition & 1 deletion Libraries/io/io.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<Reference Include="ezrSquared">
<HintPath>..\..\bin\Release\net7.0\win-x86\ezrSquared.dll</HintPath>
<HintPath>..\..\bin\Release\net7.0\win-x64\ezrSquared.dll</HintPath>
</Reference>
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion Libraries/std/std.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<Reference Include="ezrSquared">
<HintPath>..\..\bin\Release\net7.0\win-x86\ezrSquared.dll</HintPath>
<HintPath>..\..\bin\Release\net7.0\win-x64\ezrSquared.dll</HintPath>
</Reference>
</ItemGroup>

Expand Down
43 changes: 43 additions & 0 deletions Tests/gameTest.ezr2
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
include "console" from "io"
include "console" from "io"

object text_based_image with text do item image: text.split("\n")

object integer2 with x, y do
if type_of(x) ! "integer" do item this.x: x.as_integer()
if type_of(y) ! "integer" do item this.y: y.as_integer()

special equals do other.x = x and other.y = y
end

object sprite with graphics, position do
function draw do
count to graphics.image.length as y do
count to (graphics.image <= y).length as x do
console.set_cursor_position((x + position.x, y + position.y))
simple_show(graphics.image <= y <= x)
end
end
end
end

function update do
if console.is_key_pressed("W", false, false, false) do item test_sprite.position.y:- 1
if console.is_key_pressed("S", false, false, false) do item test_sprite.position.y:+ 1
if console.is_key_pressed("A", false, false, false) do item test_sprite.position.x:- 3
if console.is_key_pressed("D", false, false, false) do item test_sprite.position.x:+ 3

if test_sprite.position ! previous_position do
global item previous_position: integer2(test_sprite.position.x, test_sprite.position.y)

clear()
test_sprite.draw()
end
end

item test_sprite: sprite(text_based_image(" 0\n |\\ /=\n/[]|[]\n | |\n"), integer2(0, 0))
item previous_position: integer2(-1, -1)

while true do
update()
end
3 changes: 3 additions & 0 deletions docs/index.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ Meanwhile, check out some example programs in [***GitHub***](https://github.com/
## Latest Updates
**For those confused by the versioning: 1st place -> Major; 2nd place -> Feature; 3rd place -> Quality of Life; 4th place -> Library; 5th place -> Patch**. I plan to switch to [***Semantic Versioning 2.0.0***](https://semver.org/) for the first stable release.

* **prerelease-1.5.1.0.1** - [25-03-23]
* Fixed bug in special function `equals`

* **prerelease-1.5.1.0.0** - [23-03-23]
* "all" keyword and ',' symbol now interchangeable in normal and QuickSyntax `include` expressions

Expand Down
2 changes: 1 addition & 1 deletion ezrSquared.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SelfContained>True</SelfContained>

<TargetFramework>net7.0</TargetFramework>
Expand Down

0 comments on commit b8d2888

Please sign in to comment.