-
Notifications
You must be signed in to change notification settings - Fork 6
/
PrimeCuber-RI-v1p4.py
64 lines (56 loc) · 1.86 KB
/
PrimeCuber-RI-v1p4.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#-----------------------------------------------------------------------------
# Title: PrimeCuber
#
# Author: David Gilday
#
# Copyright: (C) 2020 David Gilday
#
# Website: http://mindcuber.com
#
# Version: v1p4
#
# Modified: $Date: 2020-12-04 18:02:42 +0000 (Fri, 04 Dec 2020) $
#
# Revision: $Revision: 7784 $
#
# Usage:
#
#This software may be used for any non-commercial purpose providing
#that the original author is acknowledged.
#
# Disclaimer:
#
#This software is provided 'as is' without warranty of any kind, either
#express or implied, including, but not limited to, the implied warranties
#of fitness for a purpose, or the warranty of non-infringement.
#
#-----------------------------------------------------------------------------
# Purpose: PrimeCuber robot Rubik's Cube solver
#-----------------------------------------------------------------------------
# Note:
#The program, PCSolver-v1p4, must be run once to install the two
#modules and data file used by this program. This basic solver will
#allow the cube to be solved in around 3.5 minutes.
#
#Optionally, the program, PCMTab4-v1p4, may be run once to install a
#large data file that enables shorter solutions to be calculated. In
#this case, the cube will be solved in around 2 minutes.
#-----------------------------------------------------------------------------
import hub, os
hub.display.show(hub.Image.DIAMOND)
try:
installed = os.stat("/pcsolver_v1p4.py")[6] > 21000
except:
installed = False
if not installed:
from spike import LightMatrix
LightMatrix().write("Check PCSolver-v1p4 has been run")
import pcsolver_v1p4
import pccolors_v1p4
import primecuber_v1p4
pcsolver_v1p4.init(pccolors_v1p4)
print("pccolors.init done")
primecuber_v1p4.main()
hub.display.show(hub.Image.YES)
raise SystemExit
# END