summaryrefslogtreecommitdiff
path: root/utils.go
diff options
context:
space:
mode:
Diffstat (limited to 'utils.go')
-rw-r--r--utils.go35
1 files changed, 28 insertions, 7 deletions
diff --git a/utils.go b/utils.go
index 9d6fc91..bed36aa 100644
--- a/utils.go
+++ b/utils.go
@@ -10,17 +10,38 @@ import (
"strconv"
"strings"
"unicode/utf8"
+ "math/rand"
+ "time"
)
const (
framewidth int = 40
- li = "\u2501"
- mli = "\u2501\u252f\u2501\u2501" //Masterline -T-
- sli = " \u251c\u2500 " //Slave Line L_
- nli = " \u2502 " //noone Line |
- fli = " \u2515\u2501\u2501" //Footer Line L
+ li string = "\u2500"
+ mli string = "\u2500\u2530\u2500\u2500" //Masterline -T-
+ sli string = " \u2520\u2500 " //Slave Line L_
+ nli string = " \u2503 " //noone Line |
+ fli string = " \u2516\u2500\u2500" //Footer Line L
)
+var positive = [...]string {"Done","Accomplished","Finished","Congrats","Completed"}
+var negative = [...]string {"Failed","Try Again","Sorry","Not Quite Yet","Incomplete"}
+
+func posR() (out string){
+ s1 := rand.NewSource(time.Now().UnixNano())
+ r1 := rand.New(s1)
+ n := r1.Intn(len(positive))
+ out = positive[n]
+ return
+}
+
+func negR() (out string){
+ s1 := rand.NewSource(time.Now().UnixNano())
+ r1 := rand.New(s1)
+ n := r1.Intn(len(negative))
+ out = negative[n]
+ return
+}
+
func frame(text string, head bool) (out string) {
if head {
out = mli + text
@@ -36,8 +57,8 @@ func frame(text string, head bool) (out string) {
}
if head {
out = "\n" + out
- }else{
- out = out + "\n"
+ //}else{
+ // out = out + "\n"
}
return
}