# Tangled Game v1.0.0

**URL:** <https://forum.ada-lang.io/t/tangled-game-v1-0-0/1380>\
**Category:** Releases\
**Created:** [October 29, 2024, 1:53am UTC](https://forum.ada-lang.io/t/tangled-game-v1-0-0/1380 "2024-10-29T01:53:34Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![nerd\_type](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/nerd_type/32/530_2.png) [@nerd\_type](https://forum.ada-lang.io/u/nerd_type)\
**Post date:** [October 31, 2024, 4:17am UTC](https://forum.ada-lang.io/t/tangled-game-v1-0-0/1380/22 "2024-10-31T04:17:03Z")

</div>

Thanks for the rationale.

As far as the ranged loop, I would expect a loop to iterate over the range specified, not the range minus one from the end. This seems intuitive to me.

> is there a way to determine the minimum number of moves necessary? it would be nice to compare how one does

Possibly. Feel free to submit a pull request.

---

<div class="post-metadata">

**Author:** ![jere](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/jere/32/87_2.png) [@jere](https://forum.ada-lang.io/u/jere)\
**Post date:** [October 31, 2024, 2:03pm UTC](https://forum.ada-lang.io/t/tangled-game-v1-0-0/1380/23 "2024-10-31T14:03:52Z")

</div>

It catches me offguard too. For what it’s worth they have an inclusive range syntax as well:

```Rust
for Index in 1..=5 
{
  do_something();
}

```

When I looked it up, the rationale given was because it was a 0 based indexing so most loops were of the form 0 to (length - 1), so they made the default range type non inclusive on the upper bound to make that simpler. It also mimic’ed the traditional for loop structure ( `for(i=0; i<length; i++)` =\> `for i in 0 .. Length` )

It’s a little loose for my taste, but I understand their thought process.

EDIT: This had some (old) discussion on it: [`...` vs `..=` for inclusive ranges - #3 by japaric - ideas (deprecated) - Rust Internals](https://internals.rust-lang.org/t/vs-for-inclusive-ranges/1539/3)

---

<div class="post-metadata">

**Author:** ![cantanima](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/cantanima/32/121_2.png) [@cantanima](https://forum.ada-lang.io/u/cantanima)\
**Post date:** [October 31, 2024, 3:43pm UTC](https://forum.ada-lang.io/t/tangled-game-v1-0-0/1380/24 "2024-10-31T15:43:59Z")

</div>

Wow. Looking at that very first sentence:

> We’ve currently adopted `..` as syntax for exclusive ranges and `...` as the syntax for inclusive ranges.

😱

So glad I didn’t have to use Rust in 2015.

I know about the `..=` syntax but in general we avoid indexing where I work. We can almost always avoid it by using functional iteration instead.

Nim and Kotlin have a syntax I like a bit better: `..` means the same as in Ada, and `..<` means a range that doesn’t include the last element.

He also writes,

> It is my opinion that inclusive rangers are a relatively rare thing.

Wow. Not in my experience… Not with Ada anyway. And it always trips me up in every language that insists on 0-based indexing.

---

<div class="post-metadata">

**Author:** ![Lucretia](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/lucretia/32/17_2.png) [@Lucretia](https://forum.ada-lang.io/u/Lucretia)\
**Post date:** [October 31, 2024, 4:06pm UTC](https://forum.ada-lang.io/t/tangled-game-v1-0-0/1380/25 "2024-10-31T16:06:14Z")

</div>

> [@cantanima](#):
>
> Wow. Not in my experience… Not with Ada anyway. And it always trips me up in every language that insists on 0-based indexing.

That’s because he’s most likely ONLY ever used c based languages.

[Previous page](https://forum.ada-lang.io/t/tangled-game-v1-0-0/1380.md?page=1)
