Skip to content

Commit

Permalink
RELEASE v0.4.0-alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
arakilian0 committed Nov 24, 2019
1 parent 1ddd0f4 commit 28e9a0a
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 23 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,21 @@

[![Build Status](https://travis-ci.com/arakilian0/about-me.svg?branch=master)](https://travis-ci.com/arakilian0/about-me) [![GitHub release](https://img.shields.io/github/release/arakilian0/about-me.svg)](https://github.com/arakilian0/about-me/releases/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/arakilian0/about-me/blob/master/LICENSE.md)

*Note: This project has only been tested on **macOS**. All commands are intended to be used for macOS systems.*

## Install
```
coming soon...
$ git clone https://github.com/arakilian0/about-me.git
```

## Build
```
$ ./run/mac/build
```

## Usage
```
coming soon...
$ ./run/mac/test
```

## License
Expand Down
Binary file modified dist/mac/arakilian0
Binary file not shown.
1 change: 1 addition & 0 deletions run/mac/build
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash

rm ./dist/mac/arakilian0
clang++ src/main.cpp -o dist/mac/arakilian0
10 changes: 9 additions & 1 deletion run/mac/test
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#!/bin/bash

./dist/mac/arakilian0
ARGUMENTS=""
ENTRY="./dist/mac/arakilian0"

for arg in $@; do
ARGUMENTS+="$arg ";
done

COMMAND="$ENTRY $ARGUMENTS"
$COMMAND
13 changes: 13 additions & 0 deletions src/cti.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#include <iostream>

using namespace std;

int CharToInt(char ichar[]) {
int ochar;

cout << ichar << endl;

// convert ichar to int
// replace '0' with ochar
return 0;
}
21 changes: 12 additions & 9 deletions src/fact.h
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
#include <iostream>
#include <string>
#include <array>
#include <cstdlib>
#include <ctime>

#include "fta.h"

using namespace std;

string fact () {
string fact (int idx = -1) {
array<string, MAX_FACTS> FactArray = FileToArray("facts.txt");
srand((unsigned) time(0));
int RandomNumber = rand() % 100;
int RandomNumber, oidx;

if(idx > -1 && idx <= MAX_FACTS - 1) {
oidx = idx;
}
else {
srand((unsigned) time(0));
RandomNumber = rand() % 100;
oidx = RandomNumber;
}

// cout << RandomNumber << endl;
return FactArray[RandomNumber];
return FactArray[oidx];
}
2 changes: 0 additions & 2 deletions src/fta.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#include <iostream>
#include <fstream>
#include <string>
#include <array>

#define MAX_FACTS 100

using namespace std;
Expand Down
29 changes: 20 additions & 9 deletions src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
#include <iostream>
#include <string>

#include "os.h"
#include "fact.h"
#include "cti.h"

using namespace std;

int main()
{
string OS = os();
string FACT = fact();
int main(int argc, char** argv) {
int i, index;

if(argc == 1 || argc >= 3) {
cout << fact() << endl;
}
else {
for (i = 0; i < argc; i++) {
if (i == 1) {
cout << "coming soon..." << endl;

// the commented code below is in development

// index = CharToInt(argv[i]);
// cout << fact(index) << endl;
}
}
}

cout << FACT << endl;
return 0;
return 0;
}

0 comments on commit 28e9a0a

Please sign in to comment.