(re)format aiken sources in the repository.
This commit is contained in:
parent
28916c1ef9
commit
8db4a60986
|
@ -88,42 +88,10 @@ const solution_100_6x6: Solution =
|
|||
move_number: 36,
|
||||
start: Some((1, 1)),
|
||||
visited: [
|
||||
(3, 2),
|
||||
(5, 3),
|
||||
(6, 1),
|
||||
(4, 2),
|
||||
(3, 4),
|
||||
(2, 6),
|
||||
(4, 5),
|
||||
(6, 6),
|
||||
(5, 4),
|
||||
(6, 2),
|
||||
(4, 1),
|
||||
(2, 2),
|
||||
(1, 4),
|
||||
(3, 3),
|
||||
(2, 1),
|
||||
(1, 3),
|
||||
(2, 5),
|
||||
(4, 6),
|
||||
(6, 5),
|
||||
(4, 4),
|
||||
(5, 2),
|
||||
(6, 4),
|
||||
(5, 6),
|
||||
(3, 5),
|
||||
(1, 6),
|
||||
(2, 4),
|
||||
(1, 2),
|
||||
(3, 1),
|
||||
(4, 3),
|
||||
(5, 1),
|
||||
(6, 3),
|
||||
(5, 5),
|
||||
(3, 6),
|
||||
(1, 5),
|
||||
(2, 3),
|
||||
(1, 1),
|
||||
(3, 2), (5, 3), (6, 1), (4, 2), (3, 4), (2, 6), (4, 5), (6, 6), (5, 4),
|
||||
(6, 2), (4, 1), (2, 2), (1, 4), (3, 3), (2, 1), (1, 3), (2, 5), (4, 6),
|
||||
(6, 5), (4, 4), (5, 2), (6, 4), (5, 6), (3, 5), (1, 6), (2, 4), (1, 2),
|
||||
(3, 1), (4, 3), (5, 1), (6, 3), (5, 5), (3, 6), (1, 5), (2, 3), (1, 1),
|
||||
],
|
||||
},
|
||||
),
|
||||
|
@ -134,42 +102,10 @@ const solution_100_6x6: Solution =
|
|||
move_number: 36,
|
||||
start: Some((1, 1)),
|
||||
visited: [
|
||||
(3, 2),
|
||||
(5, 3),
|
||||
(6, 1),
|
||||
(4, 2),
|
||||
(3, 4),
|
||||
(2, 2),
|
||||
(4, 1),
|
||||
(6, 2),
|
||||
(5, 4),
|
||||
(6, 6),
|
||||
(4, 5),
|
||||
(2, 6),
|
||||
(1, 4),
|
||||
(3, 3),
|
||||
(2, 1),
|
||||
(1, 3),
|
||||
(2, 5),
|
||||
(4, 6),
|
||||
(6, 5),
|
||||
(4, 4),
|
||||
(5, 2),
|
||||
(6, 4),
|
||||
(5, 6),
|
||||
(3, 5),
|
||||
(1, 6),
|
||||
(2, 4),
|
||||
(1, 2),
|
||||
(3, 1),
|
||||
(4, 3),
|
||||
(5, 1),
|
||||
(6, 3),
|
||||
(5, 5),
|
||||
(3, 6),
|
||||
(1, 5),
|
||||
(2, 3),
|
||||
(1, 1),
|
||||
(3, 2), (5, 3), (6, 1), (4, 2), (3, 4), (2, 2), (4, 1), (6, 2), (5, 4),
|
||||
(6, 6), (4, 5), (2, 6), (1, 4), (3, 3), (2, 1), (1, 3), (2, 5), (4, 6),
|
||||
(6, 5), (4, 4), (5, 2), (6, 4), (5, 6), (3, 5), (1, 6), (2, 4), (1, 2),
|
||||
(3, 1), (4, 3), (5, 1), (6, 3), (5, 5), (3, 6), (1, 5), (2, 3), (1, 1),
|
||||
],
|
||||
},
|
||||
),
|
||||
|
@ -180,42 +116,10 @@ const solution_100_6x6: Solution =
|
|||
move_number: 36,
|
||||
start: Some((1, 1)),
|
||||
visited: [
|
||||
(3, 2),
|
||||
(5, 3),
|
||||
(6, 1),
|
||||
(4, 2),
|
||||
(3, 4),
|
||||
(2, 2),
|
||||
(1, 4),
|
||||
(2, 6),
|
||||
(4, 5),
|
||||
(6, 6),
|
||||
(5, 4),
|
||||
(6, 2),
|
||||
(4, 1),
|
||||
(3, 3),
|
||||
(2, 1),
|
||||
(1, 3),
|
||||
(2, 5),
|
||||
(4, 6),
|
||||
(6, 5),
|
||||
(4, 4),
|
||||
(5, 2),
|
||||
(6, 4),
|
||||
(5, 6),
|
||||
(3, 5),
|
||||
(1, 6),
|
||||
(2, 4),
|
||||
(1, 2),
|
||||
(3, 1),
|
||||
(4, 3),
|
||||
(5, 1),
|
||||
(6, 3),
|
||||
(5, 5),
|
||||
(3, 6),
|
||||
(1, 5),
|
||||
(2, 3),
|
||||
(1, 1),
|
||||
(3, 2), (5, 3), (6, 1), (4, 2), (3, 4), (2, 2), (1, 4), (2, 6), (4, 5),
|
||||
(6, 6), (5, 4), (6, 2), (4, 1), (3, 3), (2, 1), (1, 3), (2, 5), (4, 6),
|
||||
(6, 5), (4, 4), (5, 2), (6, 4), (5, 6), (3, 5), (1, 6), (2, 4), (1, 2),
|
||||
(3, 1), (4, 3), (5, 1), (6, 3), (5, 5), (3, 6), (1, 5), (2, 3), (1, 1),
|
||||
],
|
||||
},
|
||||
),
|
||||
|
@ -226,48 +130,15 @@ const solution_100_6x6: Solution =
|
|||
move_number: 36,
|
||||
start: Some((1, 1)),
|
||||
visited: [
|
||||
(3, 2),
|
||||
(5, 3),
|
||||
(6, 1),
|
||||
(4, 2),
|
||||
(3, 4),
|
||||
(2, 6),
|
||||
(1, 4),
|
||||
(2, 2),
|
||||
(4, 1),
|
||||
(6, 2),
|
||||
(5, 4),
|
||||
(6, 6),
|
||||
(4, 5),
|
||||
(3, 3),
|
||||
(2, 1),
|
||||
(1, 3),
|
||||
(2, 5),
|
||||
(4, 6),
|
||||
(6, 5),
|
||||
(4, 4),
|
||||
(5, 2),
|
||||
(6, 4),
|
||||
(5, 6),
|
||||
(3, 5),
|
||||
(1, 6),
|
||||
(2, 4),
|
||||
(1, 2),
|
||||
(3, 1),
|
||||
(4, 3),
|
||||
(5, 1),
|
||||
(6, 3),
|
||||
(5, 5),
|
||||
(3, 6),
|
||||
(1, 5),
|
||||
(2, 3),
|
||||
(1, 1),
|
||||
(3, 2), (5, 3), (6, 1), (4, 2), (3, 4), (2, 6), (1, 4), (2, 2), (4, 1),
|
||||
(6, 2), (5, 4), (6, 6), (4, 5), (3, 3), (2, 1), (1, 3), (2, 5), (4, 6),
|
||||
(6, 5), (4, 4), (5, 2), (6, 4), (5, 6), (3, 5), (1, 6), (2, 4), (1, 2),
|
||||
(3, 1), (4, 3), (5, 1), (6, 3), (5, 5), (3, 6), (1, 5), (2, 3), (1, 1),
|
||||
],
|
||||
},
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
const solution_100_8x8: Solution =
|
||||
[
|
||||
(
|
||||
|
@ -277,69 +148,13 @@ const solution_100_8x8: Solution =
|
|||
move_number: 64,
|
||||
start: Some((1, 1)),
|
||||
visited: [
|
||||
(3, 2),
|
||||
(4, 4),
|
||||
(5, 6),
|
||||
(6, 4),
|
||||
(8, 5),
|
||||
(7, 7),
|
||||
(6, 5),
|
||||
(8, 4),
|
||||
(7, 2),
|
||||
(5, 3),
|
||||
(3, 4),
|
||||
(4, 6),
|
||||
(5, 8),
|
||||
(6, 6),
|
||||
(4, 5),
|
||||
(3, 7),
|
||||
(1, 8),
|
||||
(2, 6),
|
||||
(4, 7),
|
||||
(5, 5),
|
||||
(6, 3),
|
||||
(5, 1),
|
||||
(4, 3),
|
||||
(3, 5),
|
||||
(5, 4),
|
||||
(7, 3),
|
||||
(8, 1),
|
||||
(6, 2),
|
||||
(4, 1),
|
||||
(2, 2),
|
||||
(1, 4),
|
||||
(3, 3),
|
||||
(2, 5),
|
||||
(1, 3),
|
||||
(2, 1),
|
||||
(4, 2),
|
||||
(6, 1),
|
||||
(8, 2),
|
||||
(7, 4),
|
||||
(8, 6),
|
||||
(7, 8),
|
||||
(5, 7),
|
||||
(3, 8),
|
||||
(1, 7),
|
||||
(3, 6),
|
||||
(2, 8),
|
||||
(1, 6),
|
||||
(2, 4),
|
||||
(1, 2),
|
||||
(3, 1),
|
||||
(5, 2),
|
||||
(7, 1),
|
||||
(8, 3),
|
||||
(7, 5),
|
||||
(8, 7),
|
||||
(6, 8),
|
||||
(7, 6),
|
||||
(8, 8),
|
||||
(6, 7),
|
||||
(4, 8),
|
||||
(2, 7),
|
||||
(1, 5),
|
||||
(2, 3),
|
||||
(3, 2), (4, 4), (5, 6), (6, 4), (8, 5), (7, 7), (6, 5), (8, 4), (7, 2),
|
||||
(5, 3), (3, 4), (4, 6), (5, 8), (6, 6), (4, 5), (3, 7), (1, 8), (2, 6),
|
||||
(4, 7), (5, 5), (6, 3), (5, 1), (4, 3), (3, 5), (5, 4), (7, 3), (8, 1),
|
||||
(6, 2), (4, 1), (2, 2), (1, 4), (3, 3), (2, 5), (1, 3), (2, 1), (4, 2),
|
||||
(6, 1), (8, 2), (7, 4), (8, 6), (7, 8), (5, 7), (3, 8), (1, 7), (3, 6),
|
||||
(2, 8), (1, 6), (2, 4), (1, 2), (3, 1), (5, 2), (7, 1), (8, 3), (7, 5),
|
||||
(8, 7), (6, 8), (7, 6), (8, 8), (6, 7), (4, 8), (2, 7), (1, 5), (2, 3),
|
||||
(1, 1),
|
||||
],
|
||||
},
|
||||
|
@ -351,69 +166,13 @@ const solution_100_8x8: Solution =
|
|||
move_number: 64,
|
||||
start: Some((1, 1)),
|
||||
visited: [
|
||||
(3, 2),
|
||||
(4, 4),
|
||||
(5, 6),
|
||||
(7, 7),
|
||||
(8, 5),
|
||||
(6, 4),
|
||||
(7, 2),
|
||||
(8, 4),
|
||||
(6, 5),
|
||||
(5, 3),
|
||||
(3, 4),
|
||||
(4, 6),
|
||||
(5, 8),
|
||||
(6, 6),
|
||||
(4, 5),
|
||||
(3, 7),
|
||||
(1, 8),
|
||||
(2, 6),
|
||||
(4, 7),
|
||||
(5, 5),
|
||||
(6, 3),
|
||||
(5, 1),
|
||||
(4, 3),
|
||||
(3, 5),
|
||||
(5, 4),
|
||||
(7, 3),
|
||||
(8, 1),
|
||||
(6, 2),
|
||||
(4, 1),
|
||||
(2, 2),
|
||||
(1, 4),
|
||||
(3, 3),
|
||||
(2, 5),
|
||||
(1, 3),
|
||||
(2, 1),
|
||||
(4, 2),
|
||||
(6, 1),
|
||||
(8, 2),
|
||||
(7, 4),
|
||||
(8, 6),
|
||||
(7, 8),
|
||||
(5, 7),
|
||||
(3, 8),
|
||||
(1, 7),
|
||||
(3, 6),
|
||||
(2, 8),
|
||||
(1, 6),
|
||||
(2, 4),
|
||||
(1, 2),
|
||||
(3, 1),
|
||||
(5, 2),
|
||||
(7, 1),
|
||||
(8, 3),
|
||||
(7, 5),
|
||||
(8, 7),
|
||||
(6, 8),
|
||||
(7, 6),
|
||||
(8, 8),
|
||||
(6, 7),
|
||||
(4, 8),
|
||||
(2, 7),
|
||||
(1, 5),
|
||||
(2, 3),
|
||||
(3, 2), (4, 4), (5, 6), (7, 7), (8, 5), (6, 4), (7, 2), (8, 4), (6, 5),
|
||||
(5, 3), (3, 4), (4, 6), (5, 8), (6, 6), (4, 5), (3, 7), (1, 8), (2, 6),
|
||||
(4, 7), (5, 5), (6, 3), (5, 1), (4, 3), (3, 5), (5, 4), (7, 3), (8, 1),
|
||||
(6, 2), (4, 1), (2, 2), (1, 4), (3, 3), (2, 5), (1, 3), (2, 1), (4, 2),
|
||||
(6, 1), (8, 2), (7, 4), (8, 6), (7, 8), (5, 7), (3, 8), (1, 7), (3, 6),
|
||||
(2, 8), (1, 6), (2, 4), (1, 2), (3, 1), (5, 2), (7, 1), (8, 3), (7, 5),
|
||||
(8, 7), (6, 8), (7, 6), (8, 8), (6, 7), (4, 8), (2, 7), (1, 5), (2, 3),
|
||||
(1, 1),
|
||||
],
|
||||
},
|
||||
|
@ -425,69 +184,13 @@ const solution_100_8x8: Solution =
|
|||
move_number: 64,
|
||||
start: Some((1, 1)),
|
||||
visited: [
|
||||
(3, 2),
|
||||
(4, 4),
|
||||
(6, 5),
|
||||
(8, 4),
|
||||
(7, 2),
|
||||
(5, 3),
|
||||
(3, 4),
|
||||
(4, 6),
|
||||
(5, 8),
|
||||
(7, 7),
|
||||
(5, 6),
|
||||
(6, 4),
|
||||
(8, 5),
|
||||
(6, 6),
|
||||
(4, 5),
|
||||
(3, 7),
|
||||
(1, 8),
|
||||
(2, 6),
|
||||
(4, 7),
|
||||
(5, 5),
|
||||
(6, 3),
|
||||
(5, 1),
|
||||
(4, 3),
|
||||
(3, 5),
|
||||
(5, 4),
|
||||
(7, 3),
|
||||
(8, 1),
|
||||
(6, 2),
|
||||
(4, 1),
|
||||
(2, 2),
|
||||
(1, 4),
|
||||
(3, 3),
|
||||
(2, 5),
|
||||
(1, 3),
|
||||
(2, 1),
|
||||
(4, 2),
|
||||
(6, 1),
|
||||
(8, 2),
|
||||
(7, 4),
|
||||
(8, 6),
|
||||
(7, 8),
|
||||
(5, 7),
|
||||
(3, 8),
|
||||
(1, 7),
|
||||
(3, 6),
|
||||
(2, 8),
|
||||
(1, 6),
|
||||
(2, 4),
|
||||
(1, 2),
|
||||
(3, 1),
|
||||
(5, 2),
|
||||
(7, 1),
|
||||
(8, 3),
|
||||
(7, 5),
|
||||
(8, 7),
|
||||
(6, 8),
|
||||
(7, 6),
|
||||
(8, 8),
|
||||
(6, 7),
|
||||
(4, 8),
|
||||
(2, 7),
|
||||
(1, 5),
|
||||
(2, 3),
|
||||
(3, 2), (4, 4), (6, 5), (8, 4), (7, 2), (5, 3), (3, 4), (4, 6), (5, 8),
|
||||
(7, 7), (5, 6), (6, 4), (8, 5), (6, 6), (4, 5), (3, 7), (1, 8), (2, 6),
|
||||
(4, 7), (5, 5), (6, 3), (5, 1), (4, 3), (3, 5), (5, 4), (7, 3), (8, 1),
|
||||
(6, 2), (4, 1), (2, 2), (1, 4), (3, 3), (2, 5), (1, 3), (2, 1), (4, 2),
|
||||
(6, 1), (8, 2), (7, 4), (8, 6), (7, 8), (5, 7), (3, 8), (1, 7), (3, 6),
|
||||
(2, 8), (1, 6), (2, 4), (1, 2), (3, 1), (5, 2), (7, 1), (8, 3), (7, 5),
|
||||
(8, 7), (6, 8), (7, 6), (8, 8), (6, 7), (4, 8), (2, 7), (1, 5), (2, 3),
|
||||
(1, 1),
|
||||
],
|
||||
},
|
||||
|
|
|
@ -18,8 +18,7 @@ type Direction {
|
|||
RD
|
||||
}
|
||||
|
||||
const direction_list =
|
||||
[UL, UR, DL, DR, LU, LD, RU, RD]
|
||||
const direction_list = [UL, UR, DL, DR, LU, LD, RU, RD]
|
||||
|
||||
fn move(direction: Direction, tile: Tile) -> Tile {
|
||||
let (x, y) = tile
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
use aiken/collection/list
|
||||
use cardano/address.{Script, VerificationKey}
|
||||
use cardano/certificate.{
|
||||
AlwaysAbstain, AlwaysNoConfidence, AuthorizeConstitutionalCommitteeProxy,
|
||||
Certificate, DelegateBlockProduction, DelegateBoth, DelegateCredential,
|
||||
|
@ -7,7 +8,6 @@ use cardano/certificate.{
|
|||
RetireFromConstitutionalCommittee, RetireStakePool, UnregisterCredential,
|
||||
UnregisterDelegateRepresentative, UpdateDelegateRepresentative,
|
||||
}
|
||||
use cardano/address.{Script, VerificationKey}
|
||||
use cardano/transaction.{Transaction}
|
||||
|
||||
const only0s = #"00000000000000000000000000000000000000000000000000000000"
|
||||
|
@ -20,11 +20,7 @@ const only9s =
|
|||
#"9999999999999999999999999999999999999999999999999999999999999999"
|
||||
|
||||
validator purposes {
|
||||
publish(
|
||||
_redeemer: Void,
|
||||
certificate: Certificate,
|
||||
transaction: Transaction,
|
||||
) -> Bool {
|
||||
publish(_redeemer: Void, certificate: Certificate, transaction: Transaction) {
|
||||
assert_script_info(certificate)
|
||||
|
||||
let certificates = transaction.certificates
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use aiken/collection/dict.{Dict}
|
||||
use aiken/collection/list
|
||||
use cardano/assets.{PolicyId, Value}
|
||||
use cardano/address
|
||||
use cardano/assets.{PolicyId, Value}
|
||||
use cardano/transaction.{
|
||||
DatumHash, Input, Mint, NoDatum, Output, OutputReference, ScriptPurpose,
|
||||
Transaction,
|
||||
|
@ -128,10 +128,10 @@ fn assert_mint(mint: Value, our_policy_id: PolicyId, other_policy_id: PolicyId)
|
|||
// below is meant to generate a small-enough hash... If this test fails
|
||||
// after some code-gen changes, it's probably because the new hash is
|
||||
// larger.
|
||||
///
|
||||
// How to fix?
|
||||
// Change the traced string down below in hope to get a
|
||||
// smaller hash.
|
||||
///
|
||||
validator test_2 {
|
||||
mint(_tmp2: Void, _policy_id: PolicyId, _transaction: Transaction) {
|
||||
trace @"slfhioer7w8yru"
|
||||
|
|
|
@ -14,11 +14,7 @@ const null32 =
|
|||
#"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
|
||||
validator guardrails {
|
||||
propose(
|
||||
_redeemer: Void,
|
||||
_: ProposalProcedure,
|
||||
transaction: Transaction,
|
||||
) -> Bool {
|
||||
propose(_redeemer: Void, _: ProposalProcedure, transaction: Transaction) {
|
||||
let procedures = transaction.proposal_procedures
|
||||
|
||||
assert_redeemers(transaction.redeemers)
|
||||
|
|
|
@ -24,7 +24,7 @@ validator guardrails {
|
|||
_redeemer: Void,
|
||||
proposal: ProposalProcedure,
|
||||
_transaction: Transaction,
|
||||
) -> Bool {
|
||||
) {
|
||||
expect ProposalProcedure {
|
||||
governance_action: ProtocolParameters {
|
||||
ancestor: None,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use aiken/collection/dict
|
||||
use cardano/assets
|
||||
use cardano/address.{Address, Script}
|
||||
use cardano/assets
|
||||
use cardano/transaction.{
|
||||
InlineDatum, Input, Output, OutputReference, ScriptPurpose, Spend, Transaction,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue