Initial board state and tile info data setup, unit tests for board setup / serializer
Framework for the full tile type color matching, but it's all data structures and validating the structure
This commit is contained in:
parent
9b69003715
commit
6cc1092872
5 changed files with 313 additions and 0 deletions
10
Assets/Runtime/Extensions/RandomFromArray.cs
Normal file
10
Assets/Runtime/Extensions/RandomFromArray.cs
Normal file
|
@ -0,0 +1,10 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
// Helper method for randomly rolling from a generic array
|
||||
public static class RandomFromArray {
|
||||
public static T GetRandom<T>(this T[] array) {
|
||||
return array[Random.Range(0, array.Length)];
|
||||
}
|
||||
}
|
11
Assets/Runtime/Extensions/RandomFromArray.cs.meta
Normal file
11
Assets/Runtime/Extensions/RandomFromArray.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e6a7d58d735c2354ca8b3d974cd906ea
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Add table
Add a link
Reference in a new issue