VOTING POWER100.00%
DOWNVOTE POWER100.00%
RESOURCE CREDITS100.00%
REPUTATION PROGRESS76.39%
Net Worth
0.362USD
STEEM
0.008STEEM
SBD
0.004SBD
Effective Power
7.748SP
├── Own SP
6.724SP
└── Incoming DelegationsDeleg
+1.024SP
Detailed Balance
| STEEM | ||
| balance | 0.001STEEM | STEEM |
| market_balance | 0.000STEEM | STEEM |
| savings_balance | 0.000STEEM | STEEM |
| reward_steem_balance | 0.007STEEM | STEEM |
| STEEM POWER | ||
| Own SP | 6.724SP | SP |
| Delegated Out | 0.000SP | SP |
| Delegation In | 1.024SP | SP |
| Effective Power | 7.748SP | SP |
| Reward SP (pending) | 0.011SP | SP |
| SBD | ||
| sbd_balance | 0.000SBD | SBD |
| sbd_conversions | 0.000SBD | SBD |
| sbd_market_balance | 0.000SBD | SBD |
| savings_sbd_balance | 0.000SBD | SBD |
| reward_sbd_balance | 0.004SBD | SBD |
{
"balance": "0.001 STEEM",
"savings_balance": "0.000 STEEM",
"reward_steem_balance": "0.007 STEEM",
"vesting_shares": "10948.712663 VESTS",
"delegated_vesting_shares": "0.000000 VESTS",
"received_vesting_shares": "1668.145227 VESTS",
"sbd_balance": "0.000 SBD",
"savings_sbd_balance": "0.000 SBD",
"reward_sbd_balance": "0.004 SBD",
"conversions": []
}Account Info
| name | drewie |
| id | 676024 |
| rank | 149,629 |
| reputation | 157031388746 |
| created | 2018-01-29T12:24:09 |
| recovery_account | steem |
| proxy | None |
| post_count | 54 |
| comment_count | 0 |
| lifetime_vote_count | 0 |
| witnesses_voted_for | 0 |
| last_post | 2018-07-17T12:33:00 |
| last_root_post | 2018-07-17T12:33:00 |
| last_vote_time | 2018-02-18T20:35:27 |
| proxied_vsf_votes | 0, 0, 0, 0 |
| can_vote | 1 |
| voting_power | 0 |
| delayed_votes | 0 |
| balance | 0.001 STEEM |
| savings_balance | 0.000 STEEM |
| sbd_balance | 0.000 SBD |
| savings_sbd_balance | 0.000 SBD |
| vesting_shares | 10948.712663 VESTS |
| delegated_vesting_shares | 0.000000 VESTS |
| received_vesting_shares | 1668.145227 VESTS |
| reward_vesting_balance | 22.303130 VESTS |
| vesting_balance | 0.000 STEEM |
| vesting_withdraw_rate | 0.000000 VESTS |
| next_vesting_withdrawal | 1969-12-31T23:59:59 |
| withdrawn | 0 |
| to_withdraw | 0 |
| withdraw_routes | 0 |
| savings_withdraw_requests | 0 |
| last_account_recovery | 1970-01-01T00:00:00 |
| reset_account | null |
| last_owner_update | 1970-01-01T00:00:00 |
| last_account_update | 2018-02-02T23:48:39 |
| mined | No |
| sbd_seconds | 6,162,818,616 |
| sbd_last_interest_payment | 2018-03-26T10:46:33 |
| savings_sbd_last_interest_payment | 1970-01-01T00:00:00 |
{
"id": 676024,
"name": "drewie",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"STM5B4WDqftih5qFnAyKkqd2HBp7gBtnDJCEgB4Ez8egVSBAGRQqX",
1
]
]
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"STM4yj5yoBCcgFewy57kAv4Gnp5Nz3RM5cszTvpkjomF1P9Bgb4HY",
1
]
]
},
"posting": {
"weight_threshold": 1,
"account_auths": [
[
"dmania.app",
1
],
[
"dtube.app",
1
],
[
"utopian.app",
1
]
],
"key_auths": [
[
"STM8CcZDAJpMForaWEu2kQqcCYbhav23UxnLZ2KjeCQgKNcb991Gx",
1
]
]
},
"memo_key": "STM8QGFAoptZqtVZpwqEEB8GkSAB6kp5oaNVdRu6BJPanCHQ5BgNU",
"json_metadata": "{\"profile\":{\"profile_image\":\"https://i.hizliresim.com/jy3aoW.jpg\",\"about\":\"Trader,Traveler,Translator\"}}",
"posting_json_metadata": "{\"profile\":{\"profile_image\":\"https://i.hizliresim.com/jy3aoW.jpg\",\"about\":\"Trader,Traveler,Translator\"}}",
"proxy": "",
"last_owner_update": "1970-01-01T00:00:00",
"last_account_update": "2018-02-02T23:48:39",
"created": "2018-01-29T12:24:09",
"mined": false,
"recovery_account": "steem",
"last_account_recovery": "1970-01-01T00:00:00",
"reset_account": "null",
"comment_count": 0,
"lifetime_vote_count": 0,
"post_count": 54,
"can_vote": true,
"voting_manabar": {
"current_mana": "12616857890",
"last_update_time": 1750281105
},
"downvote_manabar": {
"current_mana": 3154214473,
"last_update_time": 1750281105
},
"voting_power": 0,
"balance": "0.001 STEEM",
"savings_balance": "0.000 STEEM",
"sbd_balance": "0.000 SBD",
"sbd_seconds": "6162818616",
"sbd_seconds_last_update": "2018-04-12T11:55:42",
"sbd_last_interest_payment": "2018-03-26T10:46:33",
"savings_sbd_balance": "0.000 SBD",
"savings_sbd_seconds": "0",
"savings_sbd_seconds_last_update": "1970-01-01T00:00:00",
"savings_sbd_last_interest_payment": "1970-01-01T00:00:00",
"savings_withdraw_requests": 0,
"reward_sbd_balance": "0.004 SBD",
"reward_steem_balance": "0.007 STEEM",
"reward_vesting_balance": "22.303130 VESTS",
"reward_vesting_steem": "0.011 STEEM",
"vesting_shares": "10948.712663 VESTS",
"delegated_vesting_shares": "0.000000 VESTS",
"received_vesting_shares": "1668.145227 VESTS",
"vesting_withdraw_rate": "0.000000 VESTS",
"next_vesting_withdrawal": "1969-12-31T23:59:59",
"withdrawn": 0,
"to_withdraw": 0,
"withdraw_routes": 0,
"curation_rewards": 8,
"posting_rewards": 9711,
"proxied_vsf_votes": [
0,
0,
0,
0
],
"witnesses_voted_for": 0,
"last_post": "2018-07-17T12:33:00",
"last_root_post": "2018-07-17T12:33:00",
"last_vote_time": "2018-02-18T20:35:27",
"post_bandwidth": 0,
"pending_claimed_accounts": 0,
"vesting_balance": "0.000 STEEM",
"reputation": "157031388746",
"transfer_history": [],
"market_history": [],
"post_history": [],
"vote_history": [],
"other_history": [],
"witness_votes": [],
"tags_usage": [],
"guest_bloggers": [],
"rank": 149629
}Withdraw Routes
| Incoming | Outgoing |
|---|---|
Empty | Empty |
{
"incoming": [],
"outgoing": []
}From Date
To Date
2025/06/18 21:11:45
2025/06/18 21:11:45
| delegator | steem |
| delegatee | drewie |
| vesting shares | 1668.145227 VESTS |
| Transaction Info | Block #96576356/Trx 02ed58d991dea961e511fa453c6f8a95cbca676a |
View Raw JSON Data
{
"trx_id": "02ed58d991dea961e511fa453c6f8a95cbca676a",
"block": 96576356,
"trx_in_block": 5,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2025-06-18T21:11:45",
"op": [
"delegate_vesting_shares",
{
"delegator": "steem",
"delegatee": "drewie",
"vesting_shares": "1668.145227 VESTS"
}
]
}2022/01/30 21:16:51
2022/01/30 21:16:51
| delegator | steem |
| delegatee | drewie |
| vesting shares | 1834.965022 VESTS |
| Transaction Info | Block #61194149/Trx 9cb064eed966664d93f3300a334e29e47e8f5c33 |
View Raw JSON Data
{
"trx_id": "9cb064eed966664d93f3300a334e29e47e8f5c33",
"block": 61194149,
"trx_in_block": 0,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2022-01-30T21:16:51",
"op": [
"delegate_vesting_shares",
{
"delegator": "steem",
"delegatee": "drewie",
"vesting_shares": "1834.965022 VESTS"
}
]
}2020/01/29 13:34:30
2020/01/29 13:34:30
| parent author | drewie |
| parent permlink | fetching-complete-history-and-spinning-feature-in-random-name-picker |
| author | steemitboard |
| permlink | steemitboard-notify-drewie-20200129t133430000z |
| title | |
| body | Congratulations @drewie! You received a personal award! <table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@drewie/birthday2.png</td><td>Happy Birthday! - You are on the Steem blockchain for 2 years!</td></tr></table> <sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@drewie) and compare to others on the [Steem Ranking](https://steemitboard.com/ranking/index.php?name=drewie)_</sub> ###### [Vote for @Steemitboard as a witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1) to get one more award and increased upvotes! |
| json metadata | {"image":["https://steemitboard.com/img/notify.png"]} |
| Transaction Info | Block #40353418/Trx 454ee9a2ff53a3c046ed6241d41cb437afe8d409 |
View Raw JSON Data
{
"trx_id": "454ee9a2ff53a3c046ed6241d41cb437afe8d409",
"block": 40353418,
"trx_in_block": 7,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2020-01-29T13:34:30",
"op": [
"comment",
{
"parent_author": "drewie",
"parent_permlink": "fetching-complete-history-and-spinning-feature-in-random-name-picker",
"author": "steemitboard",
"permlink": "steemitboard-notify-drewie-20200129t133430000z",
"title": "",
"body": "Congratulations @drewie! You received a personal award!\n\n<table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@drewie/birthday2.png</td><td>Happy Birthday! - You are on the Steem blockchain for 2 years!</td></tr></table>\n\n<sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@drewie) and compare to others on the [Steem Ranking](https://steemitboard.com/ranking/index.php?name=drewie)_</sub>\n\n\n###### [Vote for @Steemitboard as a witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1) to get one more award and increased upvotes!",
"json_metadata": "{\"image\":[\"https://steemitboard.com/img/notify.png\"]}"
}
]
}2019/01/29 15:01:33
2019/01/29 15:01:33
| parent author | drewie |
| parent permlink | fetching-complete-history-and-spinning-feature-in-random-name-picker |
| author | steemitboard |
| permlink | steemitboard-notify-drewie-20190129t150132000z |
| title | |
| body | Congratulations @drewie! You received a personal award! <table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@drewie/birthday1.png</td><td>Happy Birthday! - You are on the Steem blockchain for 1 year!</td></tr></table> <sub>_[Click here to view your Board](https://steemitboard.com/@drewie)_</sub> > Support [SteemitBoard's project](https://steemit.com/@steemitboard)! **[Vote for its witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1)** and **get one more award**! |
| json metadata | {"image":["https://steemitboard.com/img/notify.png"]} |
| Transaction Info | Block #29882780/Trx 880927579aac1e7576025b1bf2cb70152bc03fde |
View Raw JSON Data
{
"trx_id": "880927579aac1e7576025b1bf2cb70152bc03fde",
"block": 29882780,
"trx_in_block": 3,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2019-01-29T15:01:33",
"op": [
"comment",
{
"parent_author": "drewie",
"parent_permlink": "fetching-complete-history-and-spinning-feature-in-random-name-picker",
"author": "steemitboard",
"permlink": "steemitboard-notify-drewie-20190129t150132000z",
"title": "",
"body": "Congratulations @drewie! You received a personal award!\n\n<table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@drewie/birthday1.png</td><td>Happy Birthday! - You are on the Steem blockchain for 1 year!</td></tr></table>\n\n<sub>_[Click here to view your Board](https://steemitboard.com/@drewie)_</sub>\n\n\n> Support [SteemitBoard's project](https://steemit.com/@steemitboard)! **[Vote for its witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1)** and **get one more award**!",
"json_metadata": "{\"image\":[\"https://steemitboard.com/img/notify.png\"]}"
}
]
}2018/10/16 13:00:24
2018/10/16 13:00:24
| delegator | steem |
| delegatee | drewie |
| vesting shares | 2018.477430 VESTS |
| Transaction Info | Block #26858557/Trx f672f920a0066d8c6f3586c81e8b5902761a1b0a |
View Raw JSON Data
{
"trx_id": "f672f920a0066d8c6f3586c81e8b5902761a1b0a",
"block": 26858557,
"trx_in_block": 36,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-10-16T13:00:24",
"op": [
"delegate_vesting_shares",
{
"delegator": "steem",
"delegatee": "drewie",
"vesting_shares": "2018.477430 VESTS"
}
]
}drewiereceived 0.007 STEEM, 0.004 SBD, 0.014 SP author reward for @drewie / fetching-complete-history-and-spinning-feature-in-random-name-picker2018/07/24 12:33:00
drewiereceived 0.007 STEEM, 0.004 SBD, 0.014 SP author reward for @drewie / fetching-complete-history-and-spinning-feature-in-random-name-picker
2018/07/24 12:33:00
| author | drewie |
| permlink | fetching-complete-history-and-spinning-feature-in-random-name-picker |
| sbd payout | 0.004 SBD |
| steem payout | 0.007 STEEM |
| vesting payout | 22.303130 VESTS |
| Transaction Info | Block #24456296/Virtual Operation #4 |
View Raw JSON Data
{
"trx_id": "0000000000000000000000000000000000000000",
"block": 24456296,
"trx_in_block": 4294967295,
"op_in_trx": 0,
"virtual_op": 4,
"timestamp": "2018-07-24T12:33:00",
"op": [
"author_reward",
{
"author": "drewie",
"permlink": "fetching-complete-history-and-spinning-feature-in-random-name-picker",
"sbd_payout": "0.004 SBD",
"steem_payout": "0.007 STEEM",
"vesting_payout": "22.303130 VESTS"
}
]
}erikklokupvoted (100.00%) @drewie / fetching-complete-history-and-spinning-feature-in-random-name-picker2018/07/17 16:12:06
erikklokupvoted (100.00%) @drewie / fetching-complete-history-and-spinning-feature-in-random-name-picker
2018/07/17 16:12:06
| voter | erikklok |
| author | drewie |
| permlink | fetching-complete-history-and-spinning-feature-in-random-name-picker |
| weight | 10000 (100.00%) |
| Transaction Info | Block #24259235/Trx 75e4a50ba22c47020d2b85669c963c1d69be71fa |
View Raw JSON Data
{
"trx_id": "75e4a50ba22c47020d2b85669c963c1d69be71fa",
"block": 24259235,
"trx_in_block": 30,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-07-17T16:12:06",
"op": [
"vote",
{
"voter": "erikklok",
"author": "drewie",
"permlink": "fetching-complete-history-and-spinning-feature-in-random-name-picker",
"weight": 10000
}
]
}2018/07/17 14:23:12
2018/07/17 14:23:12
| delegator | steem |
| delegatee | drewie |
| vesting shares | 19475.525677 VESTS |
| Transaction Info | Block #24257061/Trx d0b6d4b24a75404bf01de8498bc36f64cc895562 |
View Raw JSON Data
{
"trx_id": "d0b6d4b24a75404bf01de8498bc36f64cc895562",
"block": 24257061,
"trx_in_block": 51,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-07-17T14:23:12",
"op": [
"delegate_vesting_shares",
{
"delegator": "steem",
"delegatee": "drewie",
"vesting_shares": "19475.525677 VESTS"
}
]
}2018/07/17 13:04:03
2018/07/17 13:04:03
| voter | nafestw |
| author | drewie |
| permlink | fetching-complete-history-and-spinning-feature-in-random-name-picker |
| weight | 7000 (70.00%) |
| Transaction Info | Block #24255481/Trx 889caff8c6b31dfa8ee80be6217f090ba1dfe313 |
View Raw JSON Data
{
"trx_id": "889caff8c6b31dfa8ee80be6217f090ba1dfe313",
"block": 24255481,
"trx_in_block": 12,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-07-17T13:04:03",
"op": [
"vote",
{
"voter": "nafestw",
"author": "drewie",
"permlink": "fetching-complete-history-and-spinning-feature-in-random-name-picker",
"weight": 7000
}
]
}2018/07/17 12:45:21
2018/07/17 12:45:21
| parent author | drewie |
| parent permlink | fetching-complete-history-and-spinning-feature-in-random-name-picker |
| author | sinem006 |
| permlink | re-drewie-fetching-complete-history-and-spinning-feature-in-random-name-picker-20180717t124001229z |
| title | |
| body | @@ -296,16 +296,99 @@ e a ban. +Plagiarism is really not a good practice in this community and is a great offense. %0A%0ANeed h |
| json metadata | {"tags":["utopian-io"],"users":["drewie"],"links":["https://steemit.com/utopian-io/@ckole/fetching-complete-history-and-spinning-feature-in-random-name-picker","https://support.utopian.io/","https://discordapp.com/invite/uTyJkNm","https://utopian.io/"],"app":"steemit/0.1"} |
| Transaction Info | Block #24255108/Trx fa9ddd20f360f7b1fcd448cb15e422ab085f7a42 |
View Raw JSON Data
{
"trx_id": "fa9ddd20f360f7b1fcd448cb15e422ab085f7a42",
"block": 24255108,
"trx_in_block": 13,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-07-17T12:45:21",
"op": [
"comment",
{
"parent_author": "drewie",
"parent_permlink": "fetching-complete-history-and-spinning-feature-in-random-name-picker",
"author": "sinem006",
"permlink": "re-drewie-fetching-complete-history-and-spinning-feature-in-random-name-picker-20180717t124001229z",
"title": "",
"body": "@@ -296,16 +296,99 @@\n e a ban.\n+Plagiarism is really not a good practice in this community and is a great offense. \n %0A%0ANeed h\n",
"json_metadata": "{\"tags\":[\"utopian-io\"],\"users\":[\"drewie\"],\"links\":[\"https://steemit.com/utopian-io/@ckole/fetching-complete-history-and-spinning-feature-in-random-name-picker\",\"https://support.utopian.io/\",\"https://discordapp.com/invite/uTyJkNm\",\"https://utopian.io/\"],\"app\":\"steemit/0.1\"}"
}
]
}2018/07/17 12:40:00
2018/07/17 12:40:00
| parent author | drewie |
| parent permlink | fetching-complete-history-and-spinning-feature-in-random-name-picker |
| author | sinem006 |
| permlink | re-drewie-fetching-complete-history-and-spinning-feature-in-random-name-picker-20180717t124001229z |
| title | |
| body | Hello @drewie,thank you for your contribution through the Utopian.You have commited a plagiarism from [this post](https://steemit.com/utopian-io/@ckole/fetching-complete-history-and-spinning-feature-in-random-name-picker) and according to the Utopian Rules plagiarism is not allowed and may cause a ban. Need help? Write a ticket on https://support.utopian.io/. Chat with us on [Discord](https://discordapp.com/invite/uTyJkNm) [utopian-moderator](https://utopian.io/) |
| json metadata | {"tags":["utopian-io"],"users":["drewie"],"links":["https://steemit.com/utopian-io/@ckole/fetching-complete-history-and-spinning-feature-in-random-name-picker","https://support.utopian.io/","https://discordapp.com/invite/uTyJkNm","https://utopian.io/"],"app":"steemit/0.1"} |
| Transaction Info | Block #24255001/Trx f643f551659cbb950e32cd29036276358c2ceb10 |
View Raw JSON Data
{
"trx_id": "f643f551659cbb950e32cd29036276358c2ceb10",
"block": 24255001,
"trx_in_block": 7,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-07-17T12:40:00",
"op": [
"comment",
{
"parent_author": "drewie",
"parent_permlink": "fetching-complete-history-and-spinning-feature-in-random-name-picker",
"author": "sinem006",
"permlink": "re-drewie-fetching-complete-history-and-spinning-feature-in-random-name-picker-20180717t124001229z",
"title": "",
"body": "Hello @drewie,thank you for your contribution through the Utopian.You have commited a plagiarism from [this post](https://steemit.com/utopian-io/@ckole/fetching-complete-history-and-spinning-feature-in-random-name-picker) and according to the Utopian Rules plagiarism is not allowed and may cause a ban.\n\nNeed help? Write a ticket on https://support.utopian.io/.\nChat with us on [Discord](https://discordapp.com/invite/uTyJkNm)\n[utopian-moderator](https://utopian.io/)",
"json_metadata": "{\"tags\":[\"utopian-io\"],\"users\":[\"drewie\"],\"links\":[\"https://steemit.com/utopian-io/@ckole/fetching-complete-history-and-spinning-feature-in-random-name-picker\",\"https://support.utopian.io/\",\"https://discordapp.com/invite/uTyJkNm\",\"https://utopian.io/\"],\"app\":\"steemit/0.1\"}"
}
]
}2018/07/17 12:38:36
2018/07/17 12:38:36
| required auths | [] |
| required posting auths | ["drewie"] |
| id | follow |
| json | ["follow",{"follower":"drewie","following":"tykee","what":["blog"]}] |
| Transaction Info | Block #24254973/Trx 8e68839ae3ff964608247d3d75678fa6079d742e |
View Raw JSON Data
{
"trx_id": "8e68839ae3ff964608247d3d75678fa6079d742e",
"block": 24254973,
"trx_in_block": 21,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-07-17T12:38:36",
"op": [
"custom_json",
{
"required_auths": [],
"required_posting_auths": [
"drewie"
],
"id": "follow",
"json": "[\"follow\",{\"follower\":\"drewie\",\"following\":\"tykee\",\"what\":[\"blog\"]}]"
}
]
}2018/07/17 12:38:27
2018/07/17 12:38:27
| required auths | [] |
| required posting auths | ["drewie"] |
| id | follow |
| json | ["follow",{"follower":"drewie","following":"ckole","what":["blog"]}] |
| Transaction Info | Block #24254970/Trx 16a74f345cf8028ae7ed42c4baa6539722989781 |
View Raw JSON Data
{
"trx_id": "16a74f345cf8028ae7ed42c4baa6539722989781",
"block": 24254970,
"trx_in_block": 47,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-07-17T12:38:27",
"op": [
"custom_json",
{
"required_auths": [],
"required_posting_auths": [
"drewie"
],
"id": "follow",
"json": "[\"follow\",{\"follower\":\"drewie\",\"following\":\"ckole\",\"what\":[\"blog\"]}]"
}
]
}2018/07/17 12:38:21
2018/07/17 12:38:21
| required auths | [] |
| required posting auths | ["drewie"] |
| id | follow |
| json | ["follow",{"follower":"drewie","following":"ckole","what":["blog"]}] |
| Transaction Info | Block #24254968/Trx f1058e9f4a24e30a6cb385d3e8160221688ae5bc |
View Raw JSON Data
{
"trx_id": "f1058e9f4a24e30a6cb385d3e8160221688ae5bc",
"block": 24254968,
"trx_in_block": 17,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-07-17T12:38:21",
"op": [
"custom_json",
{
"required_auths": [],
"required_posting_auths": [
"drewie"
],
"id": "follow",
"json": "[\"follow\",{\"follower\":\"drewie\",\"following\":\"ckole\",\"what\":[\"blog\"]}]"
}
]
}drewiefollowed @knowledges2018/07/17 12:38:15
drewiefollowed @knowledges
2018/07/17 12:38:15
| required auths | [] |
| required posting auths | ["drewie"] |
| id | follow |
| json | ["follow",{"follower":"drewie","following":"knowledges","what":["blog"]}] |
| Transaction Info | Block #24254966/Trx 6c21d0b2b221252353337724f4853667853d109b |
View Raw JSON Data
{
"trx_id": "6c21d0b2b221252353337724f4853667853d109b",
"block": 24254966,
"trx_in_block": 27,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-07-17T12:38:15",
"op": [
"custom_json",
{
"required_auths": [],
"required_posting_auths": [
"drewie"
],
"id": "follow",
"json": "[\"follow\",{\"follower\":\"drewie\",\"following\":\"knowledges\",\"what\":[\"blog\"]}]"
}
]
}drewiepublished a new post: fetching-complete-history-and-spinning-feature-in-random-name-picker2018/07/17 12:35:12
drewiepublished a new post: fetching-complete-history-and-spinning-feature-in-random-name-picker
2018/07/17 12:35:12
| parent author | |
| parent permlink | utopian-io |
| author | drewie |
| permlink | fetching-complete-history-and-spinning-feature-in-random-name-picker |
| title | Fetching complete history and spinning feature in Random Name Picker |
| body | @@ -2543,26 +2543,100 @@ mes%0A -5678.png 1234 +!%5B%5D(https://cdn.steemitimages.com/DQmSpxSxsnzt71BYXW62yoPKLPBGuEhW6kPp2MjViWBiKnu/image .png +) %0Acom @@ -2701,47 +2701,100 @@ one%0A -name history.png name history 1234 +!%5B%5D(https://cdn.steemitimages.com/DQmNm6dVoe3QLgzxrqSuTWXLZAJjJ6ZaxV9Favi26mMUF5K/image .png +) %0A%0ATh @@ -2966,40 +2966,193 @@ pin%0A -hjhjhjhjhjhj.png%0Aparty games +!%5B%5D(https://cdn.steemitimages.com/DQme1ZhPTcCdg1U7wgsV3dst7WeAd4n3UHzmgAL4ysPsRCu/image.png)%0A!%5B%5D(https://cdn.steemitimages.com/DQmbvpftZ1M8DyDpqYVddF21qJtqtGSsgT74rWA2oZ4rovN/image .png +) wh |
| json metadata | {"tags":["utopian-io","ideas"],"links":["https://github.com/Gear61/Random-Name-Picker"],"app":"steemit/0.1","format":"markdown","image":["https://cdn.steemitimages.com/DQmSpxSxsnzt71BYXW62yoPKLPBGuEhW6kPp2MjViWBiKnu/image.png","https://cdn.steemitimages.com/DQmNm6dVoe3QLgzxrqSuTWXLZAJjJ6ZaxV9Favi26mMUF5K/image.png","https://cdn.steemitimages.com/DQme1ZhPTcCdg1U7wgsV3dst7WeAd4n3UHzmgAL4ysPsRCu/image.png","https://cdn.steemitimages.com/DQmbvpftZ1M8DyDpqYVddF21qJtqtGSsgT74rWA2oZ4rovN/image.png"]} |
| Transaction Info | Block #24254905/Trx be9701dc223f5d216262ce16d87a890add616799 |
View Raw JSON Data
{
"trx_id": "be9701dc223f5d216262ce16d87a890add616799",
"block": 24254905,
"trx_in_block": 30,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-07-17T12:35:12",
"op": [
"comment",
{
"parent_author": "",
"parent_permlink": "utopian-io",
"author": "drewie",
"permlink": "fetching-complete-history-and-spinning-feature-in-random-name-picker",
"title": "Fetching complete history and spinning feature in Random Name Picker",
"body": "@@ -2543,26 +2543,100 @@\n mes%0A\n-5678.png 1234\n+!%5B%5D(https://cdn.steemitimages.com/DQmSpxSxsnzt71BYXW62yoPKLPBGuEhW6kPp2MjViWBiKnu/image\n .png\n+)\n %0Acom\n@@ -2701,47 +2701,100 @@\n one%0A\n-name history.png name history 1234\n+!%5B%5D(https://cdn.steemitimages.com/DQmNm6dVoe3QLgzxrqSuTWXLZAJjJ6ZaxV9Favi26mMUF5K/image\n .png\n+)\n %0A%0ATh\n@@ -2966,40 +2966,193 @@\n pin%0A\n-hjhjhjhjhjhj.png%0Aparty games\n+!%5B%5D(https://cdn.steemitimages.com/DQme1ZhPTcCdg1U7wgsV3dst7WeAd4n3UHzmgAL4ysPsRCu/image.png)%0A!%5B%5D(https://cdn.steemitimages.com/DQmbvpftZ1M8DyDpqYVddF21qJtqtGSsgT74rWA2oZ4rovN/image\n .png\n+)\n wh\n",
"json_metadata": "{\"tags\":[\"utopian-io\",\"ideas\"],\"links\":[\"https://github.com/Gear61/Random-Name-Picker\"],\"app\":\"steemit/0.1\",\"format\":\"markdown\",\"image\":[\"https://cdn.steemitimages.com/DQmSpxSxsnzt71BYXW62yoPKLPBGuEhW6kPp2MjViWBiKnu/image.png\",\"https://cdn.steemitimages.com/DQmNm6dVoe3QLgzxrqSuTWXLZAJjJ6ZaxV9Favi26mMUF5K/image.png\",\"https://cdn.steemitimages.com/DQme1ZhPTcCdg1U7wgsV3dst7WeAd4n3UHzmgAL4ysPsRCu/image.png\",\"https://cdn.steemitimages.com/DQmbvpftZ1M8DyDpqYVddF21qJtqtGSsgT74rWA2oZ4rovN/image.png\"]}"
}
]
}drewiepublished a new post: fetching-complete-history-and-spinning-feature-in-random-name-picker2018/07/17 12:33:00
drewiepublished a new post: fetching-complete-history-and-spinning-feature-in-random-name-picker
2018/07/17 12:33:00
| parent author | |
| parent permlink | utopian-io |
| author | drewie |
| permlink | fetching-complete-history-and-spinning-feature-in-random-name-picker |
| title | Fetching complete history and spinning feature in Random Name Picker |
| body | Repository :https://github.com/Gear61/Random-Name-Picker COMPONENT Random name picker is an open source android application that fundamentally help you choose from a list of names at random. This app display names that are literally listed and are chosen at random for all intent and purpose depending on the chosen number of names to be displayed. In the chosen name history, only the chosen name is shown, time and date isn't displayed. Also the random pick is only one way, there isn't any way to spin other than clicking on CHOSE to show the name picked at random which made the app to be limited. Going further, i will give list of some features to enhance the project and i hope it would be put into consideration. PROPOSAL This app was built to randomly pick names listed under list name and it has been a very good measure taken to make the app a good one, However, i will like to add my points to further enhance it in other to make users have more fun using Random Name Picker. DATE AND TIME When name is picked at random from the app, the picked name is stored somewhere in the chosen name history which can later be accessed when such information is needed but no information is complete without date and time of occurrence which is missing in the history. The date and time each name is randomly picked should be included in the history for reference purpose .since the names are already recorded, the date and time can as well be placed at the front of each name in the "chosen name history. This will make the date and time traceable when needed. SPIN THE ROULETTE Since the app can only pick numbers at random by clicking on the "CHOSE" button below the listed names. It will be fun to have an alternative way of choosing names at random as the current design doesn't welcome some approaches . To implement the spinning feature, the page on the app where names are picked at random will have a part as shown in the mock up that will be clicked to display a roulette in form of a pie chat. After names to be picked to random has been listed,the spin button will be clicked which will result in the display of a page showing the names in a circle (Roulette) . user can then click on spin below to select which ever name is pointed at by the pointer the moment the spinning circle stops. This spinning feature can go a long way in making users catch fun with the app. The benefit below will shed more light and create some interesting effect. MOCKS/UP The images below shows the look of Random Name Picker with listed names 5678.png 1234.png comparison between the present history page and the proposed one name history.png name history 1234.png The date and time will make the event track able any day any time. From the image below, clicking the SPIN will open another page where a ROULETTE can be accessed to spin hjhjhjhjhjhj.png party games.png who to answer question.png from the above images, the spinning feature can be used for fun by picking someone randomly and spinning the roulette to chose a task for the chosen person to perform... BENEFIT Having stated the features that might enhance the app, I believe it will go a long way in making it more unique. The date and time will allow the user to get the accurate history of activities done on the app. For instance, if a raffle draw is organized and the app is used as the tool to pick names at random, it would be easier and stress free to get the information of the event as touching name of winners, Time and the date the raffle took place after the event is long gone. Sometimes, draws are drawn at interval or even days in between, so if date and time are not present, it would be difficult to get the accurate history of the activities. Though there might be a way to go about it, it would be inappropriate to get the date and time elsewhere which in some cases might not even be correct if proper arrangement was not made in the first place. Really this might look simple but it will surely be of benefit. The spinning feature will allow users to do more things with the app. apart from picking names by spinning, it can be used in birthday parties, home, schools and even get together events. Series of things can be done with the spinning feature. As Random Picker normally randomly picks item from pre-defined lists setup on device. The spinning feature will integrate the process by making it more fun and exciting. It can be used to groove a party! People can watch in suspense as their name stays in the running – or is eliminated – until the final random name is left! Watching as the roulette spins will create a kind of excitement as people watch and wait to see who gets the pointer. Choosing the random name and activities is part of the fun – a great attention from viewers In conclusion The Bar chart and pie chart are different but they work with the same list in arithmetic. So also the spinning roulette and current design of random name picker, they can virtually work on predefined list set up by user but the fun, excitement, and the presentation of the end product is incomparable. |
| json metadata | {"tags":["utopian-io","ideas"],"links":["https://github.com/Gear61/Random-Name-Picker"],"app":"steemit/0.1","format":"markdown"} |
| Transaction Info | Block #24254862/Trx bbb2d7980fc02e9aade053914249649590646e8d |
View Raw JSON Data
{
"trx_id": "bbb2d7980fc02e9aade053914249649590646e8d",
"block": 24254862,
"trx_in_block": 4,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-07-17T12:33:00",
"op": [
"comment",
{
"parent_author": "",
"parent_permlink": "utopian-io",
"author": "drewie",
"permlink": "fetching-complete-history-and-spinning-feature-in-random-name-picker",
"title": "Fetching complete history and spinning feature in Random Name Picker",
"body": "Repository :https://github.com/Gear61/Random-Name-Picker\n\nCOMPONENT\n\nRandom name picker is an open source android application that fundamentally help you choose from a list of names at random. This app display names that are literally listed and are chosen at random for all intent and purpose depending on the chosen number of names to be displayed. In the chosen name history, only the chosen name is shown, time and date isn't displayed. Also the random pick is only one way, there isn't any way to spin other than clicking on CHOSE to show the name picked at random which made the app to be limited. Going further, i will give list of some features to enhance the project and i hope it would be put into consideration.\n\nPROPOSAL\n\nThis app was built to randomly pick names listed under list name and it has been a very good measure taken to make the app a good one, However, i will like to add my points to further enhance it in other to make users have more fun using Random Name Picker.\n\nDATE AND TIME\nWhen name is picked at random from the app, the picked name is stored somewhere in the chosen name history which can later be accessed when such information is needed but no information is complete without date and time of occurrence which is missing in the history. The date and time each name is randomly picked should be included in the history for reference purpose .since the names are already recorded, the date and time can as well be placed at the front of each name in the \"chosen name history. This will make the date and time traceable when needed.\n\nSPIN THE ROULETTE\n\nSince the app can only pick numbers at random by clicking on the \"CHOSE\" button below the listed names. It will be fun to have an alternative way of choosing names at random as the current design doesn't welcome some approaches .\nTo implement the spinning feature, the page on the app where names are picked at random will have a part as shown in the mock up that will be clicked to display a roulette in form of a pie chat. After names to be picked to random has been listed,the spin button will be clicked which will result in the display of a page showing the names in a circle (Roulette) . user can then click on spin below to select which ever name is pointed at by the pointer the moment the spinning circle stops.\nThis spinning feature can go a long way in making users catch fun with the app. The benefit below will shed more light and create some interesting effect.\n\nMOCKS/UP\n\nThe images below shows the look of Random Name Picker with listed names\n5678.png 1234.png\ncomparison between the present history page and the proposed one\nname history.png name history 1234.png\n\nThe date and time will make the event track able any day any time.\nFrom the image below, clicking the SPIN will open another page where a ROULETTE can be accessed to spin\nhjhjhjhjhjhj.png\nparty games.png who to answer question.png\nfrom the above images, the spinning feature can be used for fun by picking someone randomly and spinning the roulette to chose a task for the chosen person to perform...\n\nBENEFIT\nHaving stated the features that might enhance the app, I believe it will go a long way in making it more unique.\nThe date and time will allow the user to get the accurate history of activities done on the app. For instance, if a raffle draw is organized and the app is used as the tool to pick names at random, it would be easier and stress free to get the information of the event as touching name of winners, Time and the date the raffle took place after the event is long gone. Sometimes, draws are drawn at interval or even days in between, so if date and time are not present, it would be difficult to get the accurate history of the activities. Though there might be a way to go about it, it would be inappropriate to get the date and time elsewhere which in some cases might not even be correct if proper arrangement was not made in the first place.\nReally this might look simple but it will surely be of benefit.\n\nThe spinning feature will allow users to do more things with the app. apart from picking names by spinning, it can be used in birthday parties, home, schools and even get together events. Series of things can be done with the spinning feature.\nAs Random Picker normally randomly picks item from pre-defined lists setup on device. The spinning feature will integrate the process by making it more fun and exciting.\nIt can be used to groove a party!\nPeople can watch in suspense as their name stays in the running – or is eliminated – until the final random name is left! Watching as the roulette spins will create a kind of excitement as people watch and wait to see who gets the pointer.\nChoosing the random name and activities is part of the fun – a great attention from viewers\n\nIn conclusion\nThe Bar chart and pie chart are different but they work with the same list in arithmetic. So also the spinning roulette and current design of random name picker, they can virtually work on predefined list set up by user but the fun, excitement, and the presentation of the end product is incomparable.",
"json_metadata": "{\"tags\":[\"utopian-io\",\"ideas\"],\"links\":[\"https://github.com/Gear61/Random-Name-Picker\"],\"app\":\"steemit/0.1\",\"format\":\"markdown\"}"
}
]
}2018/07/12 13:52:57
2018/07/12 13:52:57
| delegator | steem |
| delegatee | drewie |
| vesting shares | 2028.824123 VESTS |
| Transaction Info | Block #24112513/Trx f4d4df228cd8e77aa50e8aad0a470053607e2fc1 |
View Raw JSON Data
{
"trx_id": "f4d4df228cd8e77aa50e8aad0a470053607e2fc1",
"block": 24112513,
"trx_in_block": 12,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-07-12T13:52:57",
"op": [
"delegate_vesting_shares",
{
"delegator": "steem",
"delegatee": "drewie",
"vesting_shares": "2028.824123 VESTS"
}
]
}2018/05/05 19:32:09
2018/05/05 19:32:09
| delegator | steem |
| delegatee | drewie |
| vesting shares | 19591.364108 VESTS |
| Transaction Info | Block #22172195/Trx 6f719de11937cfe59dfa319824d0a1385a719ede |
View Raw JSON Data
{
"trx_id": "6f719de11937cfe59dfa319824d0a1385a719ede",
"block": 22172195,
"trx_in_block": 55,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-05-05T19:32:09",
"op": [
"delegate_vesting_shares",
{
"delegator": "steem",
"delegatee": "drewie",
"vesting_shares": "19591.364108 VESTS"
}
]
}drewiesent 4.184 SBD to @blocktrades- "e7496c54-57fa-428a-9ff9-36b228a86fa3"2018/04/12 11:55:42
drewiesent 4.184 SBD to @blocktrades- "e7496c54-57fa-428a-9ff9-36b228a86fa3"
2018/04/12 11:55:42
| from | drewie |
| to | blocktrades |
| amount | 4.184 SBD |
| memo | e7496c54-57fa-428a-9ff9-36b228a86fa3 |
| Transaction Info | Block #21501449/Trx 1ee060e61a9b2ca763673add38ec3b6ded67aff5 |
View Raw JSON Data
{
"trx_id": "1ee060e61a9b2ca763673add38ec3b6ded67aff5",
"block": 21501449,
"trx_in_block": 2,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-04-12T11:55:42",
"op": [
"transfer",
{
"from": "drewie",
"to": "blocktrades",
"amount": "4.184 SBD",
"memo": "e7496c54-57fa-428a-9ff9-36b228a86fa3"
}
]
}drewieclaimed reward balance: 0.146 SBD, 0.056 SP2018/03/26 10:46:33
drewieclaimed reward balance: 0.146 SBD, 0.056 SP
2018/03/26 10:46:33
| account | drewie |
| reward steem | 0.000 STEEM |
| reward sbd | 0.146 SBD |
| reward vests | 91.947601 VESTS |
| Transaction Info | Block #21010561/Trx ed8d3fcb1a6ca78eaa505eb0445e1c0e0e14e5a6 |
View Raw JSON Data
{
"trx_id": "ed8d3fcb1a6ca78eaa505eb0445e1c0e0e14e5a6",
"block": 21010561,
"trx_in_block": 34,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-03-26T10:46:33",
"op": [
"claim_reward_balance",
{
"account": "drewie",
"reward_steem": "0.000 STEEM",
"reward_sbd": "0.146 SBD",
"reward_vests": "91.947601 VESTS"
}
]
}drewiereceived 0.146 SBD, 0.056 SP author reward for @drewie / tic-tac-toe-game-user-vs-computer-on-java2018/02/26 21:05:33
drewiereceived 0.146 SBD, 0.056 SP author reward for @drewie / tic-tac-toe-game-user-vs-computer-on-java
2018/02/26 21:05:33
| author | drewie |
| permlink | tic-tac-toe-game-user-vs-computer-on-java |
| sbd payout | 0.146 SBD |
| steem payout | 0.000 STEEM |
| vesting payout | 91.947601 VESTS |
| Transaction Info | Block #20218108/Virtual Operation #12 |
View Raw JSON Data
{
"trx_id": "0000000000000000000000000000000000000000",
"block": 20218108,
"trx_in_block": 4294967295,
"op_in_trx": 0,
"virtual_op": 12,
"timestamp": "2018-02-26T21:05:33",
"op": [
"author_reward",
{
"author": "drewie",
"permlink": "tic-tac-toe-game-user-vs-computer-on-java",
"sbd_payout": "0.146 SBD",
"steem_payout": "0.000 STEEM",
"vesting_payout": "91.947601 VESTS"
}
]
}utopian.payreceived 0.036 SP benefactor reward from @drewie2018/02/26 21:05:33
utopian.payreceived 0.036 SP benefactor reward from @drewie
2018/02/26 21:05:33
| benefactor | utopian.pay |
| author | drewie |
| permlink | tic-tac-toe-game-user-vs-computer-on-java |
| sbd payout | 0.000 SBD |
| steem payout | 0.000 STEEM |
| vesting payout | 59.255120 VESTS |
| Transaction Info | Block #20218108/Virtual Operation #11 |
View Raw JSON Data
{
"trx_id": "0000000000000000000000000000000000000000",
"block": 20218108,
"trx_in_block": 4294967295,
"op_in_trx": 0,
"virtual_op": 11,
"timestamp": "2018-02-26T21:05:33",
"op": [
"comment_benefactor_reward",
{
"benefactor": "utopian.pay",
"author": "drewie",
"permlink": "tic-tac-toe-game-user-vs-computer-on-java",
"sbd_payout": "0.000 SBD",
"steem_payout": "0.000 STEEM",
"vesting_payout": "59.255120 VESTS"
}
]
}2018/02/25 03:28:39
2018/02/25 03:28:39
| delegator | steem |
| delegatee | drewie |
| vesting shares | 19795.091350 VESTS |
| Transaction Info | Block #20168190/Trx 1550688cb86401246ec31f5ebdf5e1c5722ca48d |
View Raw JSON Data
{
"trx_id": "1550688cb86401246ec31f5ebdf5e1c5722ca48d",
"block": 20168190,
"trx_in_block": 10,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-25T03:28:39",
"op": [
"delegate_vesting_shares",
{
"delegator": "steem",
"delegatee": "drewie",
"vesting_shares": "19795.091350 VESTS"
}
]
}drewieclaimed reward balance: 4.038 SBD, 1.374 SP2018/02/25 02:21:36
drewieclaimed reward balance: 4.038 SBD, 1.374 SP
2018/02/25 02:21:36
| account | drewie |
| reward steem | 0.000 STEEM |
| reward sbd | 4.038 SBD |
| reward vests | 2237.845167 VESTS |
| Transaction Info | Block #20166850/Trx 7a21290c50a7007e8879ea67eddf5f6b21f29321 |
View Raw JSON Data
{
"trx_id": "7a21290c50a7007e8879ea67eddf5f6b21f29321",
"block": 20166850,
"trx_in_block": 59,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-25T02:21:36",
"op": [
"claim_reward_balance",
{
"account": "drewie",
"reward_steem": "0.000 STEEM",
"reward_sbd": "4.038 SBD",
"reward_vests": "2237.845167 VESTS"
}
]
}drewiereceived 0.003 SP curation reward for @creon / re-drewie-making-a-steembackeddollar-currency-converter-on-java-20180217t134133280z2018/02/24 13:41:39
drewiereceived 0.003 SP curation reward for @creon / re-drewie-making-a-steembackeddollar-currency-converter-on-java-20180217t134133280z
2018/02/24 13:41:39
| curator | drewie |
| reward | 4.087058 VESTS |
| comment author | creon |
| comment permlink | re-drewie-making-a-steembackeddollar-currency-converter-on-java-20180217t134133280z |
| Transaction Info | Block #20151652/Virtual Operation #22 |
View Raw JSON Data
{
"trx_id": "0000000000000000000000000000000000000000",
"block": 20151652,
"trx_in_block": 4294967295,
"op_in_trx": 0,
"virtual_op": 22,
"timestamp": "2018-02-24T13:41:39",
"op": [
"curation_reward",
{
"curator": "drewie",
"reward": "4.087058 VESTS",
"comment_author": "creon",
"comment_permlink": "re-drewie-making-a-steembackeddollar-currency-converter-on-java-20180217t134133280z"
}
]
}maczak6603upvoted (100.00%) @drewie / basic-calculator-on-c2018/02/23 21:33:12
maczak6603upvoted (100.00%) @drewie / basic-calculator-on-c
2018/02/23 21:33:12
| voter | maczak6603 |
| author | drewie |
| permlink | basic-calculator-on-c |
| weight | 10000 (100.00%) |
| Transaction Info | Block #20132287/Trx 831127d843f0d5c16b9a4002a5ec394cc67f5a4d |
View Raw JSON Data
{
"trx_id": "831127d843f0d5c16b9a4002a5ec394cc67f5a4d",
"block": 20132287,
"trx_in_block": 48,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-23T21:33:12",
"op": [
"vote",
{
"voter": "maczak6603",
"author": "drewie",
"permlink": "basic-calculator-on-c",
"weight": 10000
}
]
}drewiereceived 4.038 SBD, 1.372 SP author reward for @drewie / making-a-steembackeddollar-currency-converter-on-java2018/02/23 00:57:06
drewiereceived 4.038 SBD, 1.372 SP author reward for @drewie / making-a-steembackeddollar-currency-converter-on-java
2018/02/23 00:57:06
| author | drewie |
| permlink | making-a-steembackeddollar-currency-converter-on-java |
| sbd payout | 4.038 SBD |
| steem payout | 0.000 STEEM |
| vesting payout | 2233.758109 VESTS |
| Transaction Info | Block #20107566/Virtual Operation #25 |
View Raw JSON Data
{
"trx_id": "0000000000000000000000000000000000000000",
"block": 20107566,
"trx_in_block": 4294967295,
"op_in_trx": 0,
"virtual_op": 25,
"timestamp": "2018-02-23T00:57:06",
"op": [
"author_reward",
{
"author": "drewie",
"permlink": "making-a-steembackeddollar-currency-converter-on-java",
"sbd_payout": "4.038 SBD",
"steem_payout": "0.000 STEEM",
"vesting_payout": "2233.758109 VESTS"
}
]
}utopian.payreceived 0.914 SP benefactor reward from @drewie2018/02/23 00:57:06
utopian.payreceived 0.914 SP benefactor reward from @drewie
2018/02/23 00:57:06
| benefactor | utopian.pay |
| author | drewie |
| permlink | making-a-steembackeddollar-currency-converter-on-java |
| sbd payout | 0.000 SBD |
| steem payout | 0.000 STEEM |
| vesting payout | 1487.809609 VESTS |
| Transaction Info | Block #20107566/Virtual Operation #24 |
View Raw JSON Data
{
"trx_id": "0000000000000000000000000000000000000000",
"block": 20107566,
"trx_in_block": 4294967295,
"op_in_trx": 0,
"virtual_op": 24,
"timestamp": "2018-02-23T00:57:06",
"op": [
"comment_benefactor_reward",
{
"benefactor": "utopian.pay",
"author": "drewie",
"permlink": "making-a-steembackeddollar-currency-converter-on-java",
"sbd_payout": "0.000 SBD",
"steem_payout": "0.000 STEEM",
"vesting_payout": "1487.809609 VESTS"
}
]
}2018/02/19 22:35:24
2018/02/19 22:35:24
| delegator | steem |
| delegatee | drewie |
| vesting shares | 22041.370956 VESTS |
| Transaction Info | Block #20018349/Trx 6461b08f0cb86ed6bdc864f052f2ed559893e62e |
View Raw JSON Data
{
"trx_id": "6461b08f0cb86ed6bdc864f052f2ed559893e62e",
"block": 20018349,
"trx_in_block": 30,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-19T22:35:24",
"op": [
"delegate_vesting_shares",
{
"delegator": "steem",
"delegatee": "drewie",
"vesting_shares": "22041.370956 VESTS"
}
]
}drewiesent 15.182 SBD to @blocktrades- "3b3f27a4-3d0f-4ec0-afa1-600db0d14f24"2018/02/19 22:05:42
drewiesent 15.182 SBD to @blocktrades- "3b3f27a4-3d0f-4ec0-afa1-600db0d14f24"
2018/02/19 22:05:42
| from | drewie |
| to | blocktrades |
| amount | 15.182 SBD |
| memo | 3b3f27a4-3d0f-4ec0-afa1-600db0d14f24 |
| Transaction Info | Block #20017756/Trx b6a99c58d8a653819ee6f01153fe2527aafd0f31 |
View Raw JSON Data
{
"trx_id": "b6a99c58d8a653819ee6f01153fe2527aafd0f31",
"block": 20017756,
"trx_in_block": 18,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-19T22:05:42",
"op": [
"transfer",
{
"from": "drewie",
"to": "blocktrades",
"amount": "15.182 SBD",
"memo": "3b3f27a4-3d0f-4ec0-afa1-600db0d14f24"
}
]
}drewieclaimed reward balance: 15.174 SBD, 4.474 SP2018/02/19 22:04:03
drewieclaimed reward balance: 15.174 SBD, 4.474 SP
2018/02/19 22:04:03
| account | drewie |
| reward steem | 0.000 STEEM |
| reward sbd | 15.174 SBD |
| reward vests | 7284.928546 VESTS |
| Transaction Info | Block #20017723/Trx 176903e43d245aa39b135c340a3618bb9a14afd7 |
View Raw JSON Data
{
"trx_id": "176903e43d245aa39b135c340a3618bb9a14afd7",
"block": 20017723,
"trx_in_block": 27,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-19T22:04:03",
"op": [
"claim_reward_balance",
{
"account": "drewie",
"reward_steem": "0.000 STEEM",
"reward_sbd": "15.174 SBD",
"reward_vests": "7284.928546 VESTS"
}
]
}drewiereceived 15.174 SBD, 4.474 SP author reward for @drewie / making-form-applet-and-adding-checkboxs-on-java2018/02/19 22:02:48
drewiereceived 15.174 SBD, 4.474 SP author reward for @drewie / making-form-applet-and-adding-checkboxs-on-java
2018/02/19 22:02:48
| author | drewie |
| permlink | making-form-applet-and-adding-checkboxs-on-java |
| sbd payout | 15.174 SBD |
| steem payout | 0.000 STEEM |
| vesting payout | 7284.928546 VESTS |
| Transaction Info | Block #20017697/Virtual Operation #20 |
View Raw JSON Data
{
"trx_id": "0000000000000000000000000000000000000000",
"block": 20017697,
"trx_in_block": 4294967295,
"op_in_trx": 0,
"virtual_op": 20,
"timestamp": "2018-02-19T22:02:48",
"op": [
"author_reward",
{
"author": "drewie",
"permlink": "making-form-applet-and-adding-checkboxs-on-java",
"sbd_payout": "15.174 SBD",
"steem_payout": "0.000 STEEM",
"vesting_payout": "7284.928546 VESTS"
}
]
}utopian.payreceived 2.981 SP benefactor reward from @drewie2018/02/19 22:02:48
utopian.payreceived 2.981 SP benefactor reward from @drewie
2018/02/19 22:02:48
| benefactor | utopian.pay |
| author | drewie |
| permlink | making-form-applet-and-adding-checkboxs-on-java |
| sbd payout | 0.000 SBD |
| steem payout | 0.000 STEEM |
| vesting payout | 4854.574999 VESTS |
| Transaction Info | Block #20017697/Virtual Operation #19 |
View Raw JSON Data
{
"trx_id": "0000000000000000000000000000000000000000",
"block": 20017697,
"trx_in_block": 4294967295,
"op_in_trx": 0,
"virtual_op": 19,
"timestamp": "2018-02-19T22:02:48",
"op": [
"comment_benefactor_reward",
{
"benefactor": "utopian.pay",
"author": "drewie",
"permlink": "making-form-applet-and-adding-checkboxs-on-java",
"sbd_payout": "0.000 SBD",
"steem_payout": "0.000 STEEM",
"vesting_payout": "4854.574999 VESTS"
}
]
}sandanupvoted (100.00%) @drewie / tic-tac-toe-game-user-vs-computer-on-java2018/02/19 21:55:21
sandanupvoted (100.00%) @drewie / tic-tac-toe-game-user-vs-computer-on-java
2018/02/19 21:55:21
| voter | sandan |
| author | drewie |
| permlink | tic-tac-toe-game-user-vs-computer-on-java |
| weight | 10000 (100.00%) |
| Transaction Info | Block #20017549/Trx c90b9635420e496800fbd63c33b19c9a1421fa01 |
View Raw JSON Data
{
"trx_id": "c90b9635420e496800fbd63c33b19c9a1421fa01",
"block": 20017549,
"trx_in_block": 44,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-19T21:55:21",
"op": [
"vote",
{
"voter": "sandan",
"author": "drewie",
"permlink": "tic-tac-toe-game-user-vs-computer-on-java",
"weight": 10000
}
]
}2018/02/19 21:26:57
2018/02/19 21:26:57
| parent author | amosbastian |
| parent permlink | re-drewie-tic-tac-toe-game-user-vs-computer-on-java-20180219t212301058z |
| author | drewie |
| permlink | re-amosbastian-re-drewie-tic-tac-toe-game-user-vs-computer-on-java-20180219t212657606z |
| title | |
| body | hello,what is plagiarisim? @amosbastian |
| json metadata | {"tags":["utopian-io"],"users":["amosbastian"],"app":"steemit/0.1"} |
| Transaction Info | Block #20016982/Trx 4f051929f713bf7ef5e47b636f405cc7895727ca |
View Raw JSON Data
{
"trx_id": "4f051929f713bf7ef5e47b636f405cc7895727ca",
"block": 20016982,
"trx_in_block": 24,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-19T21:26:57",
"op": [
"comment",
{
"parent_author": "amosbastian",
"parent_permlink": "re-drewie-tic-tac-toe-game-user-vs-computer-on-java-20180219t212301058z",
"author": "drewie",
"permlink": "re-amosbastian-re-drewie-tic-tac-toe-game-user-vs-computer-on-java-20180219t212657606z",
"title": "",
"body": "hello,what is plagiarisim? @amosbastian",
"json_metadata": "{\"tags\":[\"utopian-io\"],\"users\":[\"amosbastian\"],\"app\":\"steemit/0.1\"}"
}
]
}teamupvoted (10.00%) @drewie / tic-tac-toe-game-user-vs-computer-on-java2018/02/19 21:24:09
teamupvoted (10.00%) @drewie / tic-tac-toe-game-user-vs-computer-on-java
2018/02/19 21:24:09
| voter | team |
| author | drewie |
| permlink | tic-tac-toe-game-user-vs-computer-on-java |
| weight | 1000 (10.00%) |
| Transaction Info | Block #20016926/Trx 2865e571cf005097c2184ecbb09ada565727c466 |
View Raw JSON Data
{
"trx_id": "2865e571cf005097c2184ecbb09ada565727c466",
"block": 20016926,
"trx_in_block": 6,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-19T21:24:09",
"op": [
"vote",
{
"voter": "team",
"author": "drewie",
"permlink": "tic-tac-toe-game-user-vs-computer-on-java",
"weight": 1000
}
]
}2018/02/19 21:23:03
2018/02/19 21:23:03
| parent author | drewie |
| parent permlink | tic-tac-toe-game-user-vs-computer-on-java |
| author | amosbastian |
| permlink | re-drewie-tic-tac-toe-game-user-vs-computer-on-java-20180219t212301058z |
| title | |
| body | Your contribution cannot be approved because it does not follow the [Utopian Rules](https://utopian.io/rules), and is considered as **plagiarism**. Plagiarism is not allowed on Utopian, and posts that engage in plagiarism will be flagged and hidden forever. Plagiarised from [here](http://www.chegg.com/homework-help/questions-and-answers/need-help-java-program-must-use-either-1d-2d-array-solve--thanks-assist-import-javautilsca-q7638307) or somewhere else; it's not your code. You can contact us on [Discord](https://discord.gg/uTyJkNm). **[[utopian-moderator]](https://utopian.io/moderators)** |
| json metadata | {"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"} |
| Transaction Info | Block #20016904/Trx 7b906000e6ecef4eac51fcfcb68bfaed68977d64 |
View Raw JSON Data
{
"trx_id": "7b906000e6ecef4eac51fcfcb68bfaed68977d64",
"block": 20016904,
"trx_in_block": 44,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-19T21:23:03",
"op": [
"comment",
{
"parent_author": "drewie",
"parent_permlink": "tic-tac-toe-game-user-vs-computer-on-java",
"author": "amosbastian",
"permlink": "re-drewie-tic-tac-toe-game-user-vs-computer-on-java-20180219t212301058z",
"title": "",
"body": "Your contribution cannot be approved because it does not follow the [Utopian Rules](https://utopian.io/rules), and is considered as **plagiarism**. Plagiarism is not allowed on Utopian, and posts that engage in plagiarism will be flagged and hidden forever.\n\nPlagiarised from [here](http://www.chegg.com/homework-help/questions-and-answers/need-help-java-program-must-use-either-1d-2d-array-solve--thanks-assist-import-javautilsca-q7638307) or somewhere else; it's not your code.\n\nYou can contact us on [Discord](https://discord.gg/uTyJkNm).\n**[[utopian-moderator]](https://utopian.io/moderators)**",
"json_metadata": "{\"tags\":[\"utopian-io\"],\"community\":\"utopian\",\"app\":\"utopian/1.0.0\"}"
}
]
}drewiepublished a new post: tic-tac-toe-game-user-vs-computer-on-java2018/02/19 21:22:03
drewiepublished a new post: tic-tac-toe-game-user-vs-computer-on-java
2018/02/19 21:22:03
| parent author | |
| parent permlink | utopian-io |
| author | drewie |
| permlink | tic-tac-toe-game-user-vs-computer-on-java |
| title | Tic-Tac-Toe Game [ User Vs Computer ] On Java |
| body | #### What Will I Learn? - You will learn how to use variables,loops and arrays - You will learn how to make a tic tac toe game #### Requirements - Knowledge of coding on Java and Eclipse - Eclipse and Java must be setted up on the computer. #### Difficulty - Intermediate #### Tutorial Contents Hello,in this tutorial we are going to make a player vs computer tic-tac-toe game by using java on eclipse.First i defined my needed one line library then named my program.After i defined integer type variables in a,b,c which is my rows and a1,c3 etc. is my columns,then i defined a new static named "Scanner" to scan where user and computer is choosed to make their move. ``` import java.util.Scanner; public class TicTacToeGameByDrewie { static int A1, A2, A3, B1, B2, B3, C1, C2, C3; static Scanner sc = new Scanner(System.in); public static void main(String[] args) { ``` In the next step i defined my strings to welcome the user,and show user moves.In the below i used Boolean,this function is used to define True/false situation.GameisWon variable is false at that line because game has **not** started yet. ``` public static void main(String[] args) { String prompt = "Welcome to Tic-Tac-Toe Game. Please enter your first move: "; String humanMove = ""; String computerMove = ""; boolean gameIsWon = false; ``` Now we are going to use for and if loop together.We made i<=9 because in this game there can be maximum 9 moves.First we define human move."Prompt" is used to get input from the user so we are asking user to make the first movement. Updateboard is used after user made his/her move,we put in on the screen and then we display is with using "displayboard".We do same thing for the computer in the below and if the user won we use our "gameiswon" class to find out.We define it on user and computers code lines and use if loop to check who won with using "true".In the last line we check if it is draw and if noone won we print out to say "it is a draw". ``` for (int i = 1; i <=9; i++) { humanMove = getMove(prompt); updateBoard(humanMove, 1); displayBoard(); if (isGameWon()) { System.out.println("You beated me!"); gameIsWon = true; break; } if (i < 9) { computerMove = getComputerMove(); System.out.println("I will play at " + computerMove); updateBoard(computerMove, 2); displayBoard(); if (isGameWon()) { System.out.println("I beated you!"); gameIsWon = true; break; } prompt = "Please enter your next move: "; i++; } } if (!gameIsWon) System.out.println("It's a draw!"); } ```  Now game is beggining.First of all we create a class to get users move if user make a wrong input for example "a4" this is a wrong input,we will warn user.Then we create another class,if the input is valid we define all the rows and columns with using "equalsignorecase" this method is basically compares the strings that you have defined.We equal them all to zero so if the user or computer make a movement it will change. ``` public static String getMove(String prompt) { String play; System.out.print(prompt); do { play = sc.nextLine(); if (!isValidPlay(play)) { System.out.println("That is not a valid play."); } } while (!isValidPlay(play)); return play; } public static boolean isValidPlay(String play) { if (play.equalsIgnoreCase("A1") & A1 == 0) return true; if (play.equalsIgnoreCase("A2") & A2 == 0) return true; if (play.equalsIgnoreCase("A3") & A3 == 0) return true; if (play.equalsIgnoreCase("B1") & B1 == 0) return true; if (play.equalsIgnoreCase("B2") & B2 == 0) return true; if (play.equalsIgnoreCase("B3") & B3 == 0) return true; if (play.equalsIgnoreCase("C1") & C1 == 0) return true; if (play.equalsIgnoreCase("C2") & C2 == 0) return true; if (play.equalsIgnoreCase("C3") & C3 == 0) return true; return false; } ```  Now until here user and computer has made their move now we have to show it to user and update it.To do this we use "equalsignorecase" again.Basically we define users movement to the program with evaluating all the possibilities. ``` public static void updateBoard(String play, int player) { if (play.equalsIgnoreCase("A1")) A1 = player; if (play.equalsIgnoreCase("A2")) A2 = player; if (play.equalsIgnoreCase("A3")) A3 = player; if (play.equalsIgnoreCase("B1")) B1 = player; if (play.equalsIgnoreCase("B2")) B2 = player; if (play.equalsIgnoreCase("B3")) B3 = player; if (play.equalsIgnoreCase("C1")) C1 = player; if (play.equalsIgnoreCase("C2")) C2 = player; if (play.equalsIgnoreCase("C3")) C3 = player; } ``` In this step because of we haven't made an applet,we have to draw a tic-tac-toe game for the visuality.With using system.print.out as you know we asked user to make first move above after user choose where to move for example "a1" this lines will draw a X to a1. Then we must define to the program who is playing.To do that we create another class and as you know we defined "square".This is to find out whos turn is it.If it is users turn program will draw X if not it will draw "O". ``` public static void displayBoard() { String line = ""; System.out.println(); line = " " + getXO(A1) + " | " + getXO(A2) + " | " + getXO(A3); System.out.println(line); System.out.println("-----------"); line = " " + getXO(B1) + " | " + getXO(B2) + " | " + getXO(B3); System.out.println(line); System.out.println("-----------"); line = " " + getXO(C1) + " | " + getXO(C2) + " | " + getXO(C3); System.out.println(line); System.out.println(); } public static String getXO(int square) { if (square == 1) return "X"; if (square == 2) return "O"; return " "; } ```  In the final step we do same thing we did for the user.We define computers move to the program with creating a class and using if loop to evaluate the possibilities and define each line and column and equal to zero. Then we create another class to define the possibilites of winning.You can win with making 3 line cross,vertical or horizontal so we define all the possibilities and if user or computer made it through the 3 lines correctly we use "return true" which will show the message whoever won.It can be a draw so if any of cases didn't happen it will return false "draw" message. ``` public static String getComputerMove() { if (A1 == 0) return "A1"; if (A2 == 0) return "A2"; if (A3 == 0) return "A3"; if (B1 == 0) return "B1"; if (B2 == 0) return "B2"; if (B3 == 0) return "B3"; if (C1 == 0) return "C1"; if (C2 == 0) return "C2"; if (C3 == 0) return "C3"; return ""; } public static boolean isGameWon() { if (isRowWon(A1, A2, A3)) return true; if (isRowWon(B1, B2, B3)) return true; if (isRowWon(C1, C2, C3)) return true; if (isRowWon(A1, B1, C1)) return true; if (isRowWon(A2, B2, C2)) return true; if (isRowWon(A3, B3, C3)) return true; if (isRowWon(A1, B2, C3)) return true; if (isRowWon(A3, B2, C1)) return true; return false; } public static boolean isRowWon(int a, int b, int c) { return ((a == b) & (a == c) & (a != 0)); } } ```  #### Whole code with the screenshots and output ``` import java.util.Scanner; public class TicTacToeGameByDrewie { static int A1, A2, A3, B1, B2, B3, C1, C2, C3; static Scanner sc = new Scanner(System.in); public static void main(String[] args) { String prompt = "Welcome to Tic-Tac-Toe Game. Please enter your first move: "; String humanMove = ""; String computerMove = ""; boolean gameIsWon = false; for (int i = 1; i <=9; i++) { humanMove = getMove(prompt); updateBoard(humanMove, 1); displayBoard(); if (isGameWon()) { System.out.println("You beated me!"); gameIsWon = true; break; } if (i < 9) { computerMove = getComputerMove(); System.out.println("I will play at " + computerMove); updateBoard(computerMove, 2); displayBoard(); if (isGameWon()) { System.out.println("I beated you!"); gameIsWon = true; break; } prompt = "Please enter your next move: "; i++; } } if (!gameIsWon) System.out.println("It's a draw!"); } public static String getMove(String prompt) { String play; System.out.print(prompt); do { play = sc.nextLine(); if (!isValidPlay(play)) { System.out.println("That is not a valid play."); } } while (!isValidPlay(play)); return play; } public static boolean isValidPlay(String play) { if (play.equalsIgnoreCase("A1") & A1 == 0) return true; if (play.equalsIgnoreCase("A2") & A2 == 0) return true; if (play.equalsIgnoreCase("A3") & A3 == 0) return true; if (play.equalsIgnoreCase("B1") & B1 == 0) return true; if (play.equalsIgnoreCase("B2") & B2 == 0) return true; if (play.equalsIgnoreCase("B3") & B3 == 0) return true; if (play.equalsIgnoreCase("C1") & C1 == 0) return true; if (play.equalsIgnoreCase("C2") & C2 == 0) return true; if (play.equalsIgnoreCase("C3") & C3 == 0) return true; return false; } public static void updateBoard(String play, int player) { if (play.equalsIgnoreCase("A1")) A1 = player; if (play.equalsIgnoreCase("A2")) A2 = player; if (play.equalsIgnoreCase("A3")) A3 = player; if (play.equalsIgnoreCase("B1")) B1 = player; if (play.equalsIgnoreCase("B2")) B2 = player; if (play.equalsIgnoreCase("B3")) B3 = player; if (play.equalsIgnoreCase("C1")) C1 = player; if (play.equalsIgnoreCase("C2")) C2 = player; if (play.equalsIgnoreCase("C3")) C3 = player; } public static void displayBoard() { String line = ""; System.out.println(); line = " " + getXO(A1) + " | " + getXO(A2) + " | " + getXO(A3); System.out.println(line); System.out.println("-----------"); line = " " + getXO(B1) + " | " + getXO(B2) + " | " + getXO(B3); System.out.println(line); System.out.println("-----------"); line = " " + getXO(C1) + " | " + getXO(C2) + " | " + getXO(C3); System.out.println(line); System.out.println(); } public static String getXO(int square) { if (square == 1) return "X"; if (square == 2) return "O"; return " "; } public static String getComputerMove() { if (A1 == 0) return "A1"; if (A2 == 0) return "A2"; if (A3 == 0) return "A3"; if (B1 == 0) return "B1"; if (B2 == 0) return "B2"; if (B3 == 0) return "B3"; if (C1 == 0) return "C1"; if (C2 == 0) return "C2"; if (C3 == 0) return "C3"; return ""; } public static boolean isGameWon() { if (isRowWon(A1, A2, A3)) return true; if (isRowWon(B1, B2, B3)) return true; if (isRowWon(C1, C2, C3)) return true; if (isRowWon(A1, B1, C1)) return true; if (isRowWon(A2, B2, C2)) return true; if (isRowWon(A3, B3, C3)) return true; if (isRowWon(A1, B2, C3)) return true; if (isRowWon(A3, B2, C1)) return true; return false; } public static boolean isRowWon(int a, int b, int c) { return ((a == b) & (a == c) & (a != 0)); } } ```      #### Outputs   #### Curriculum - [First Tutorial](https://utopian.io/utopian-io/@drewie/making-form-applet-and-adding-checkboxs-on-java) - [Second Tutorial](https://utopian.io/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java) <br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@drewie/tic-tac-toe-game-user-vs-computer-on-java">Utopian.io - Rewarding Open Source Contributors</a></em><hr/> |
| json metadata | {"community":"utopian","app":"utopian/1.0.0","format":"markdown","repository":{"id":5360933,"name":"openjdk","full_name":"dmlloyd/openjdk","html_url":"https://github.com/dmlloyd/openjdk","fork":false,"owner":{"login":"dmlloyd"}},"pullRequests":[],"platform":"github","type":"tutorials","tags":["utopian-io","utopian-io","tutorial","java","eclipse"],"users":["drewie"],"links":["https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067430/hnl07w1kyhkh0sdzccwh.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067731/mup6poxzabmcaxzm3yqu.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068433/mp8hhx3pirl7qqssng0w.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068784/ay0l6otaa9ktm2pctbpv.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069063/njskjts7behabjn7winf.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069177/p9dngye2o2vcrrsnvpby.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069187/vj5qvigzy9h0qwpgejkp.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069194/exh7tpe6zlfzzbatavez.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069201/klf4yrsfhheiyvbbfsdu.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069276/bpab5og1qesejuzul3zi.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069333/ie14yhxyxav0gbz9mxuj.png","https://utopian.io/utopian-io/@drewie/making-form-applet-and-adding-checkboxs-on-java","https://utopian.io/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java"],"image":["https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067430/hnl07w1kyhkh0sdzccwh.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067731/mup6poxzabmcaxzm3yqu.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068433/mp8hhx3pirl7qqssng0w.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068784/ay0l6otaa9ktm2pctbpv.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069063/njskjts7behabjn7winf.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069177/p9dngye2o2vcrrsnvpby.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069187/vj5qvigzy9h0qwpgejkp.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069194/exh7tpe6zlfzzbatavez.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069201/klf4yrsfhheiyvbbfsdu.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069276/bpab5og1qesejuzul3zi.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069333/ie14yhxyxav0gbz9mxuj.png"],"moderator":{"account":"amosbastian","time":"2018-02-19T21:22:02.176Z","flagged":true,"reviewed":false,"pending":false},"questions":[],"score":0} |
| Transaction Info | Block #20016884/Trx 9422e969c3f7d9228c2f9e3e59d324c55ceb63e4 |
View Raw JSON Data
{
"trx_id": "9422e969c3f7d9228c2f9e3e59d324c55ceb63e4",
"block": 20016884,
"trx_in_block": 65,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-19T21:22:03",
"op": [
"comment",
{
"parent_author": "",
"parent_permlink": "utopian-io",
"author": "drewie",
"permlink": "tic-tac-toe-game-user-vs-computer-on-java",
"title": "Tic-Tac-Toe Game [ User Vs Computer ] On Java",
"body": "\n#### What Will I Learn?\n\n- You will learn how to use variables,loops and arrays\n- You will learn how to make a tic tac toe game\n\n#### Requirements\n\n- Knowledge of coding on Java and Eclipse\n- Eclipse and Java must be setted up on the computer.\n\n#### Difficulty\n\n- Intermediate\n\n\n#### Tutorial Contents\n\nHello,in this tutorial we are going to make a player vs computer tic-tac-toe game by using java on eclipse.First i defined my needed one line library then named my program.After i defined integer type variables in a,b,c which is my rows and a1,c3 etc. is my columns,then i defined a new static named \"Scanner\" to scan where user and computer is choosed to make their move.\n\n```\nimport java.util.Scanner;\n\n\npublic class TicTacToeGameByDrewie\n{\n\nstatic int A1, A2, A3, B1, B2, B3, C1, C2, C3;\n\nstatic Scanner sc = new Scanner(System.in);\n\npublic static void main(String[] args)\n{\n ```\nIn the next step i defined my strings to welcome the user,and show user moves.In the below i used Boolean,this function is used to define True/false situation.GameisWon variable is false at that line because game has **not** started yet.\n\n```\npublic static void main(String[] args)\n{\nString prompt = \"Welcome to Tic-Tac-Toe Game. Please enter your first move: \";\nString humanMove = \"\";\nString computerMove = \"\";\nboolean gameIsWon = false; \n ```\n\nNow we are going to use for and if loop together.We made i<=9 because in this game there can be maximum 9 moves.First we define human move.\"Prompt\" is used to get input from the user so we are asking user to make the first movement.\n\nUpdateboard is used after user made his/her move,we put in on the screen and then we display is with using \"displayboard\".We do same thing for the computer in the below and if the user won we use our \"gameiswon\" class to find out.We define it on user and computers code lines and use if loop to check who won with using \"true\".In the last line we check if it is draw and if noone won we print out to say \"it is a draw\".\n\n```\nfor (int i = 1; i <=9; i++)\n{\nhumanMove = getMove(prompt);\nupdateBoard(humanMove, 1);\ndisplayBoard();\nif (isGameWon())\n{\nSystem.out.println(\"You beated me!\");\ngameIsWon = true;\nbreak;\n}\n\nif (i < 9)\n{\ncomputerMove = getComputerMove();\nSystem.out.println(\"I will play at \" + computerMove);\nupdateBoard(computerMove, 2);\ndisplayBoard();\nif (isGameWon())\n{\nSystem.out.println(\"I beated you!\");\ngameIsWon = true;\nbreak;\n}\nprompt = \"Please enter your next move: \";\ni++;\n}\n}\nif (!gameIsWon)\nSystem.out.println(\"It's a draw!\");\n}\n ```\n\n\nNow game is beggining.First of all we create a class to get users move if user make a wrong input for example \"a4\" this is a wrong input,we will warn user.Then we create another class,if the input is valid we define all the rows and columns with using \"equalsignorecase\" this method is basically compares the strings that you have defined.We equal them all to zero so if the user or computer make a movement it will change.\n\n```\npublic static String getMove(String prompt)\n\t{\n\t\tString play;\n\t\tSystem.out.print(prompt);\n\t\tdo\n\t\t{\n\t\t\tplay = sc.nextLine();\n\t\t\tif (!isValidPlay(play))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"That is not a valid play.\");\n\t\t\t}\n\t\t} while (!isValidPlay(play));\n\t\treturn play;\n\t}\n\n\tpublic static boolean isValidPlay(String play)\n\t{\n\t\tif (play.equalsIgnoreCase(\"A1\") & A1 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"A2\") & A2 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"A3\") & A3 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"B1\") & B1 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"B2\") & B2 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"B3\") & B3 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"C1\") & C1 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"C2\") & C2 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"C3\") & C3 == 0)\n\t\t\treturn true;\n\t\treturn false;\n\t}\n \n ```\n\n\n\nNow until here user and computer has made their move now we have to show it to user and update it.To do this we use \"equalsignorecase\" again.Basically we define users movement to the program with evaluating all the possibilities.\n\n```\npublic static void updateBoard(String play, int player)\n\t{\n\t\tif (play.equalsIgnoreCase(\"A1\"))\n\t\t\tA1 = player;\n\t\tif (play.equalsIgnoreCase(\"A2\"))\n\t\t\tA2 = player;\n\t\tif (play.equalsIgnoreCase(\"A3\"))\n\t\t\tA3 = player;\n\t\tif (play.equalsIgnoreCase(\"B1\"))\n\t\t\tB1 = player;\n\t\tif (play.equalsIgnoreCase(\"B2\"))\n\t\t\tB2 = player;\n\t\tif (play.equalsIgnoreCase(\"B3\"))\n\t\t\tB3 = player;\n\t\tif (play.equalsIgnoreCase(\"C1\"))\n\t\t\tC1 = player;\n\t\tif (play.equalsIgnoreCase(\"C2\"))\n\t\t\tC2 = player;\n\t\tif (play.equalsIgnoreCase(\"C3\"))\n\t\t\tC3 = player;\n\t}\n \n ```\n\nIn this step because of we haven't made an applet,we have to draw a tic-tac-toe game for the visuality.With using system.print.out as you know we asked user to make first move above after user choose where to move for example \"a1\" this lines will draw a X to a1.\n\nThen we must define to the program who is playing.To do that we create another class and as you know we defined \"square\".This is to find out whos turn is it.If it is users turn program will draw X if not it will draw \"O\".\n\n```\n public static void displayBoard()\n\t{\n\t\tString line = \"\";\n\t\tSystem.out.println();\n\t\tline = \" \" + getXO(A1) + \" | \" + getXO(A2) + \" | \" + getXO(A3);\n\t\tSystem.out.println(line);\n\t\tSystem.out.println(\"-----------\");\n\t\tline = \" \" + getXO(B1) + \" | \" + getXO(B2) + \" | \" + getXO(B3);\n\t\tSystem.out.println(line);\n\t\tSystem.out.println(\"-----------\");\n\t\tline = \" \" + getXO(C1) + \" | \" + getXO(C2) + \" | \" + getXO(C3);\n\t\tSystem.out.println(line);\n\t\tSystem.out.println();\n\t}\n\n\tpublic static String getXO(int square)\n\t{\n\t\tif (square == 1)\n\t\t\treturn \"X\";\n\t\tif (square == 2)\n\t\t\treturn \"O\";\n\t\treturn \" \";\n\t} \n ```\n\n\n\nIn the final step we do same thing we did for the user.We define computers move to the program with creating a class and using if loop to evaluate the possibilities and define each line and column and equal to zero.\n\nThen we create another class to define the possibilites of winning.You can win with making 3 line cross,vertical or horizontal so we define all the possibilities and if user or computer made it through the 3 lines correctly we use \"return true\" which will show the message whoever won.It can be a draw so if any of cases didn't happen it will return false \"draw\" message.\n\n```\npublic static String getComputerMove()\n\t{\n\t\tif (A1 == 0)\n\t\t\treturn \"A1\";\n\t\tif (A2 == 0)\n\t\t\treturn \"A2\";\n\t\tif (A3 == 0)\n\t\t\treturn \"A3\";\n\t\tif (B1 == 0)\n\t\t\treturn \"B1\";\n\t\tif (B2 == 0)\n\t\t\treturn \"B2\";\n\t\tif (B3 == 0)\n\t\t\treturn \"B3\";\n\t\tif (C1 == 0)\n\t\t\treturn \"C1\";\n\t\tif (C2 == 0)\n\t\t\treturn \"C2\";\n\t\tif (C3 == 0)\n\t\t\treturn \"C3\";\n\t\treturn \"\";\n\t}\n\n\tpublic static boolean isGameWon()\n\t{\n\t\tif (isRowWon(A1, A2, A3))\n\t\t\treturn true;\n\t\tif (isRowWon(B1, B2, B3))\n\t\t\treturn true;\n\t\tif (isRowWon(C1, C2, C3))\n\t\t\treturn true;\n\t\tif (isRowWon(A1, B1, C1))\n\t\t\treturn true;\n\t\tif (isRowWon(A2, B2, C2))\n\t\t\treturn true;\n\t\tif (isRowWon(A3, B3, C3))\n\t\t\treturn true;\n\t\tif (isRowWon(A1, B2, C3))\n\t\t\treturn true;\n\t\tif (isRowWon(A3, B2, C1))\n\t\t\treturn true;\n\t\treturn false;\n\t}\npublic static boolean isRowWon(int a, int b, int c)\n\t{\n\t\treturn ((a == b) & (a == c) & (a != 0));\n\t}\n}\n ```\n\n\n#### Whole code with the screenshots and output\n\n```\n import java.util.Scanner;\n\npublic class TicTacToeGameByDrewie\n{\n\n\tstatic int A1, A2, A3, B1, B2, B3, C1, C2, C3;\n\n\tstatic Scanner sc = new Scanner(System.in);\n\n\tpublic static void main(String[] args)\n\t{\n\t\tString prompt = \"Welcome to Tic-Tac-Toe Game. Please enter your first move: \";\n\t\tString humanMove = \"\";\n\t\tString computerMove = \"\";\n\t\tboolean gameIsWon = false;\n\n\n\t\tfor (int i = 1; i <=9; i++)\n\t\t{\n\n\t\t\thumanMove = getMove(prompt);\n\t\t\tupdateBoard(humanMove, 1);\n\t\t\tdisplayBoard();\n\t\t\tif (isGameWon())\n\t\t\t{\n\t\t\t\tSystem.out.println(\"You beated me!\");\n\t\t\t\tgameIsWon = true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (i < 9)\n\t\t\t{\n\t\t\t\tcomputerMove = getComputerMove();\n\t\t\t\tSystem.out.println(\"I will play at \" + computerMove);\n\t\t\t\tupdateBoard(computerMove, 2);\n\t\t\t\tdisplayBoard();\n\t\t\t\tif (isGameWon())\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"I beated you!\");\n\t\t\t\t\tgameIsWon = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tprompt = \"Please enter your next move: \";\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tif (!gameIsWon)\n\t\t\tSystem.out.println(\"It's a draw!\");\n\t}\n\n\tpublic static String getMove(String prompt)\n\t{\n\t\tString play;\n\t\tSystem.out.print(prompt);\n\t\tdo\n\t\t{\n\t\t\tplay = sc.nextLine();\n\t\t\tif (!isValidPlay(play))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"That is not a valid play.\");\n\t\t\t}\n\t\t} while (!isValidPlay(play));\n\t\treturn play;\n\t}\n\n\tpublic static boolean isValidPlay(String play)\n\t{\n\t\tif (play.equalsIgnoreCase(\"A1\") & A1 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"A2\") & A2 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"A3\") & A3 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"B1\") & B1 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"B2\") & B2 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"B3\") & B3 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"C1\") & C1 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"C2\") & C2 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"C3\") & C3 == 0)\n\t\t\treturn true;\n\t\treturn false;\n\t}\n\n\tpublic static void updateBoard(String play, int player)\n\t{\n\t\tif (play.equalsIgnoreCase(\"A1\"))\n\t\t\tA1 = player;\n\t\tif (play.equalsIgnoreCase(\"A2\"))\n\t\t\tA2 = player;\n\t\tif (play.equalsIgnoreCase(\"A3\"))\n\t\t\tA3 = player;\n\t\tif (play.equalsIgnoreCase(\"B1\"))\n\t\t\tB1 = player;\n\t\tif (play.equalsIgnoreCase(\"B2\"))\n\t\t\tB2 = player;\n\t\tif (play.equalsIgnoreCase(\"B3\"))\n\t\t\tB3 = player;\n\t\tif (play.equalsIgnoreCase(\"C1\"))\n\t\t\tC1 = player;\n\t\tif (play.equalsIgnoreCase(\"C2\"))\n\t\t\tC2 = player;\n\t\tif (play.equalsIgnoreCase(\"C3\"))\n\t\t\tC3 = player;\n\t}\n\n\tpublic static void displayBoard()\n\t{\n\t\tString line = \"\";\n\t\tSystem.out.println();\n\t\tline = \" \" + getXO(A1) + \" | \" + getXO(A2) + \" | \" + getXO(A3);\n\t\tSystem.out.println(line);\n\t\tSystem.out.println(\"-----------\");\n\t\tline = \" \" + getXO(B1) + \" | \" + getXO(B2) + \" | \" + getXO(B3);\n\t\tSystem.out.println(line);\n\t\tSystem.out.println(\"-----------\");\n\t\tline = \" \" + getXO(C1) + \" | \" + getXO(C2) + \" | \" + getXO(C3);\n\t\tSystem.out.println(line);\n\t\tSystem.out.println();\n\t}\n\n\tpublic static String getXO(int square)\n\t{\n\t\tif (square == 1)\n\t\t\treturn \"X\";\n\t\tif (square == 2)\n\t\t\treturn \"O\";\n\t\treturn \" \";\n\t}\n\n\tpublic static String getComputerMove()\n\t{\n\t\tif (A1 == 0)\n\t\t\treturn \"A1\";\n\t\tif (A2 == 0)\n\t\t\treturn \"A2\";\n\t\tif (A3 == 0)\n\t\t\treturn \"A3\";\n\t\tif (B1 == 0)\n\t\t\treturn \"B1\";\n\t\tif (B2 == 0)\n\t\t\treturn \"B2\";\n\t\tif (B3 == 0)\n\t\t\treturn \"B3\";\n\t\tif (C1 == 0)\n\t\t\treturn \"C1\";\n\t\tif (C2 == 0)\n\t\t\treturn \"C2\";\n\t\tif (C3 == 0)\n\t\t\treturn \"C3\";\n\t\treturn \"\";\n\t}\n\n\tpublic static boolean isGameWon()\n\t{\n\t\tif (isRowWon(A1, A2, A3))\n\t\t\treturn true;\n\t\tif (isRowWon(B1, B2, B3))\n\t\t\treturn true;\n\t\tif (isRowWon(C1, C2, C3))\n\t\t\treturn true;\n\t\tif (isRowWon(A1, B1, C1))\n\t\t\treturn true;\n\t\tif (isRowWon(A2, B2, C2))\n\t\t\treturn true;\n\t\tif (isRowWon(A3, B3, C3))\n\t\t\treturn true;\n\t\tif (isRowWon(A1, B2, C3))\n\t\t\treturn true;\n\t\tif (isRowWon(A3, B2, C1))\n\t\t\treturn true;\n\t\treturn false;\n\t}\n\n\tpublic static boolean isRowWon(int a, int b, int c)\n\t{\n\t\treturn ((a == b) & (a == c) & (a != 0));\n\t}\n}\n\n \n ```\n\n\n\n\n\n\n\n\n\n\n\n#### Outputs\n\n\n\n\n\n\n#### Curriculum\n\n- [First Tutorial](https://utopian.io/utopian-io/@drewie/making-form-applet-and-adding-checkboxs-on-java)\n- [Second Tutorial](https://utopian.io/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java)\n\n \n\n<br /><hr/><em>Posted on <a href=\"https://utopian.io/utopian-io/@drewie/tic-tac-toe-game-user-vs-computer-on-java\">Utopian.io - Rewarding Open Source Contributors</a></em><hr/>",
"json_metadata": "{\"community\":\"utopian\",\"app\":\"utopian/1.0.0\",\"format\":\"markdown\",\"repository\":{\"id\":5360933,\"name\":\"openjdk\",\"full_name\":\"dmlloyd/openjdk\",\"html_url\":\"https://github.com/dmlloyd/openjdk\",\"fork\":false,\"owner\":{\"login\":\"dmlloyd\"}},\"pullRequests\":[],\"platform\":\"github\",\"type\":\"tutorials\",\"tags\":[\"utopian-io\",\"utopian-io\",\"tutorial\",\"java\",\"eclipse\"],\"users\":[\"drewie\"],\"links\":[\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067430/hnl07w1kyhkh0sdzccwh.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067731/mup6poxzabmcaxzm3yqu.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068433/mp8hhx3pirl7qqssng0w.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068784/ay0l6otaa9ktm2pctbpv.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069063/njskjts7behabjn7winf.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069177/p9dngye2o2vcrrsnvpby.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069187/vj5qvigzy9h0qwpgejkp.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069194/exh7tpe6zlfzzbatavez.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069201/klf4yrsfhheiyvbbfsdu.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069276/bpab5og1qesejuzul3zi.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069333/ie14yhxyxav0gbz9mxuj.png\",\"https://utopian.io/utopian-io/@drewie/making-form-applet-and-adding-checkboxs-on-java\",\"https://utopian.io/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java\"],\"image\":[\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067430/hnl07w1kyhkh0sdzccwh.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067731/mup6poxzabmcaxzm3yqu.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068433/mp8hhx3pirl7qqssng0w.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068784/ay0l6otaa9ktm2pctbpv.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069063/njskjts7behabjn7winf.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069177/p9dngye2o2vcrrsnvpby.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069187/vj5qvigzy9h0qwpgejkp.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069194/exh7tpe6zlfzzbatavez.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069201/klf4yrsfhheiyvbbfsdu.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069276/bpab5og1qesejuzul3zi.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069333/ie14yhxyxav0gbz9mxuj.png\"],\"moderator\":{\"account\":\"amosbastian\",\"time\":\"2018-02-19T21:22:02.176Z\",\"flagged\":true,\"reviewed\":false,\"pending\":false},\"questions\":[],\"score\":0}"
}
]
}drewiepublished a new post: tic-tac-toe-game-user-vs-computer-on-java2018/02/19 21:22:00
drewiepublished a new post: tic-tac-toe-game-user-vs-computer-on-java
2018/02/19 21:22:00
| parent author | |
| parent permlink | utopian-io |
| author | drewie |
| permlink | tic-tac-toe-game-user-vs-computer-on-java |
| title | Tic-Tac-Toe Game [ User Vs Computer ] On Java |
| body | #### What Will I Learn? - You will learn how to use variables,loops and arrays - You will learn how to make a tic tac toe game #### Requirements - Knowledge of coding on Java and Eclipse - Eclipse and Java must be setted up on the computer. #### Difficulty - Intermediate #### Tutorial Contents Hello,in this tutorial we are going to make a player vs computer tic-tac-toe game by using java on eclipse.First i defined my needed one line library then named my program.After i defined integer type variables in a,b,c which is my rows and a1,c3 etc. is my columns,then i defined a new static named "Scanner" to scan where user and computer is choosed to make their move. ``` import java.util.Scanner; public class TicTacToeGameByDrewie { static int A1, A2, A3, B1, B2, B3, C1, C2, C3; static Scanner sc = new Scanner(System.in); public static void main(String[] args) { ``` In the next step i defined my strings to welcome the user,and show user moves.In the below i used Boolean,this function is used to define True/false situation.GameisWon variable is false at that line because game has **not** started yet. ``` public static void main(String[] args) { String prompt = "Welcome to Tic-Tac-Toe Game. Please enter your first move: "; String humanMove = ""; String computerMove = ""; boolean gameIsWon = false; ``` Now we are going to use for and if loop together.We made i<=9 because in this game there can be maximum 9 moves.First we define human move."Prompt" is used to get input from the user so we are asking user to make the first movement. Updateboard is used after user made his/her move,we put in on the screen and then we display is with using "displayboard".We do same thing for the computer in the below and if the user won we use our "gameiswon" class to find out.We define it on user and computers code lines and use if loop to check who won with using "true".In the last line we check if it is draw and if noone won we print out to say "it is a draw". ``` for (int i = 1; i <=9; i++) { humanMove = getMove(prompt); updateBoard(humanMove, 1); displayBoard(); if (isGameWon()) { System.out.println("You beated me!"); gameIsWon = true; break; } if (i < 9) { computerMove = getComputerMove(); System.out.println("I will play at " + computerMove); updateBoard(computerMove, 2); displayBoard(); if (isGameWon()) { System.out.println("I beated you!"); gameIsWon = true; break; } prompt = "Please enter your next move: "; i++; } } if (!gameIsWon) System.out.println("It's a draw!"); } ```  Now game is beggining.First of all we create a class to get users move if user make a wrong input for example "a4" this is a wrong input,we will warn user.Then we create another class,if the input is valid we define all the rows and columns with using "equalsignorecase" this method is basically compares the strings that you have defined.We equal them all to zero so if the user or computer make a movement it will change. ``` public static String getMove(String prompt) { String play; System.out.print(prompt); do { play = sc.nextLine(); if (!isValidPlay(play)) { System.out.println("That is not a valid play."); } } while (!isValidPlay(play)); return play; } public static boolean isValidPlay(String play) { if (play.equalsIgnoreCase("A1") & A1 == 0) return true; if (play.equalsIgnoreCase("A2") & A2 == 0) return true; if (play.equalsIgnoreCase("A3") & A3 == 0) return true; if (play.equalsIgnoreCase("B1") & B1 == 0) return true; if (play.equalsIgnoreCase("B2") & B2 == 0) return true; if (play.equalsIgnoreCase("B3") & B3 == 0) return true; if (play.equalsIgnoreCase("C1") & C1 == 0) return true; if (play.equalsIgnoreCase("C2") & C2 == 0) return true; if (play.equalsIgnoreCase("C3") & C3 == 0) return true; return false; } ```  Now until here user and computer has made their move now we have to show it to user and update it.To do this we use "equalsignorecase" again.Basically we define users movement to the program with evaluating all the possibilities. ``` public static void updateBoard(String play, int player) { if (play.equalsIgnoreCase("A1")) A1 = player; if (play.equalsIgnoreCase("A2")) A2 = player; if (play.equalsIgnoreCase("A3")) A3 = player; if (play.equalsIgnoreCase("B1")) B1 = player; if (play.equalsIgnoreCase("B2")) B2 = player; if (play.equalsIgnoreCase("B3")) B3 = player; if (play.equalsIgnoreCase("C1")) C1 = player; if (play.equalsIgnoreCase("C2")) C2 = player; if (play.equalsIgnoreCase("C3")) C3 = player; } ``` In this step because of we haven't made an applet,we have to draw a tic-tac-toe game for the visuality.With using system.print.out as you know we asked user to make first move above after user choose where to move for example "a1" this lines will draw a X to a1. Then we must define to the program who is playing.To do that we create another class and as you know we defined "square".This is to find out whos turn is it.If it is users turn program will draw X if not it will draw "O". ``` public static void displayBoard() { String line = ""; System.out.println(); line = " " + getXO(A1) + " | " + getXO(A2) + " | " + getXO(A3); System.out.println(line); System.out.println("-----------"); line = " " + getXO(B1) + " | " + getXO(B2) + " | " + getXO(B3); System.out.println(line); System.out.println("-----------"); line = " " + getXO(C1) + " | " + getXO(C2) + " | " + getXO(C3); System.out.println(line); System.out.println(); } public static String getXO(int square) { if (square == 1) return "X"; if (square == 2) return "O"; return " "; } ```  In the final step we do same thing we did for the user.We define computers move to the program with creating a class and using if loop to evaluate the possibilities and define each line and column and equal to zero. Then we create another class to define the possibilites of winning.You can win with making 3 line cross,vertical or horizontal so we define all the possibilities and if user or computer made it through the 3 lines correctly we use "return true" which will show the message whoever won.It can be a draw so if any of cases didn't happen it will return false "draw" message. ``` public static String getComputerMove() { if (A1 == 0) return "A1"; if (A2 == 0) return "A2"; if (A3 == 0) return "A3"; if (B1 == 0) return "B1"; if (B2 == 0) return "B2"; if (B3 == 0) return "B3"; if (C1 == 0) return "C1"; if (C2 == 0) return "C2"; if (C3 == 0) return "C3"; return ""; } public static boolean isGameWon() { if (isRowWon(A1, A2, A3)) return true; if (isRowWon(B1, B2, B3)) return true; if (isRowWon(C1, C2, C3)) return true; if (isRowWon(A1, B1, C1)) return true; if (isRowWon(A2, B2, C2)) return true; if (isRowWon(A3, B3, C3)) return true; if (isRowWon(A1, B2, C3)) return true; if (isRowWon(A3, B2, C1)) return true; return false; } public static boolean isRowWon(int a, int b, int c) { return ((a == b) & (a == c) & (a != 0)); } } ```  #### Whole code with the screenshots and output ``` import java.util.Scanner; public class TicTacToeGameByDrewie { static int A1, A2, A3, B1, B2, B3, C1, C2, C3; static Scanner sc = new Scanner(System.in); public static void main(String[] args) { String prompt = "Welcome to Tic-Tac-Toe Game. Please enter your first move: "; String humanMove = ""; String computerMove = ""; boolean gameIsWon = false; for (int i = 1; i <=9; i++) { humanMove = getMove(prompt); updateBoard(humanMove, 1); displayBoard(); if (isGameWon()) { System.out.println("You beated me!"); gameIsWon = true; break; } if (i < 9) { computerMove = getComputerMove(); System.out.println("I will play at " + computerMove); updateBoard(computerMove, 2); displayBoard(); if (isGameWon()) { System.out.println("I beated you!"); gameIsWon = true; break; } prompt = "Please enter your next move: "; i++; } } if (!gameIsWon) System.out.println("It's a draw!"); } public static String getMove(String prompt) { String play; System.out.print(prompt); do { play = sc.nextLine(); if (!isValidPlay(play)) { System.out.println("That is not a valid play."); } } while (!isValidPlay(play)); return play; } public static boolean isValidPlay(String play) { if (play.equalsIgnoreCase("A1") & A1 == 0) return true; if (play.equalsIgnoreCase("A2") & A2 == 0) return true; if (play.equalsIgnoreCase("A3") & A3 == 0) return true; if (play.equalsIgnoreCase("B1") & B1 == 0) return true; if (play.equalsIgnoreCase("B2") & B2 == 0) return true; if (play.equalsIgnoreCase("B3") & B3 == 0) return true; if (play.equalsIgnoreCase("C1") & C1 == 0) return true; if (play.equalsIgnoreCase("C2") & C2 == 0) return true; if (play.equalsIgnoreCase("C3") & C3 == 0) return true; return false; } public static void updateBoard(String play, int player) { if (play.equalsIgnoreCase("A1")) A1 = player; if (play.equalsIgnoreCase("A2")) A2 = player; if (play.equalsIgnoreCase("A3")) A3 = player; if (play.equalsIgnoreCase("B1")) B1 = player; if (play.equalsIgnoreCase("B2")) B2 = player; if (play.equalsIgnoreCase("B3")) B3 = player; if (play.equalsIgnoreCase("C1")) C1 = player; if (play.equalsIgnoreCase("C2")) C2 = player; if (play.equalsIgnoreCase("C3")) C3 = player; } public static void displayBoard() { String line = ""; System.out.println(); line = " " + getXO(A1) + " | " + getXO(A2) + " | " + getXO(A3); System.out.println(line); System.out.println("-----------"); line = " " + getXO(B1) + " | " + getXO(B2) + " | " + getXO(B3); System.out.println(line); System.out.println("-----------"); line = " " + getXO(C1) + " | " + getXO(C2) + " | " + getXO(C3); System.out.println(line); System.out.println(); } public static String getXO(int square) { if (square == 1) return "X"; if (square == 2) return "O"; return " "; } public static String getComputerMove() { if (A1 == 0) return "A1"; if (A2 == 0) return "A2"; if (A3 == 0) return "A3"; if (B1 == 0) return "B1"; if (B2 == 0) return "B2"; if (B3 == 0) return "B3"; if (C1 == 0) return "C1"; if (C2 == 0) return "C2"; if (C3 == 0) return "C3"; return ""; } public static boolean isGameWon() { if (isRowWon(A1, A2, A3)) return true; if (isRowWon(B1, B2, B3)) return true; if (isRowWon(C1, C2, C3)) return true; if (isRowWon(A1, B1, C1)) return true; if (isRowWon(A2, B2, C2)) return true; if (isRowWon(A3, B3, C3)) return true; if (isRowWon(A1, B2, C3)) return true; if (isRowWon(A3, B2, C1)) return true; return false; } public static boolean isRowWon(int a, int b, int c) { return ((a == b) & (a == c) & (a != 0)); } } ```      #### Outputs   #### Curriculum - [First Tutorial](https://utopian.io/utopian-io/@drewie/making-form-applet-and-adding-checkboxs-on-java) - [Second Tutorial](https://utopian.io/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java) <br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@drewie/tic-tac-toe-game-user-vs-computer-on-java">Utopian.io - Rewarding Open Source Contributors</a></em><hr/> |
| json metadata | {"community":"utopian","app":"utopian/1.0.0","format":"markdown","repository":{"id":5360933,"name":"openjdk","full_name":"dmlloyd/openjdk","html_url":"https://github.com/dmlloyd/openjdk","fork":false,"owner":{"login":"dmlloyd"}},"pullRequests":[],"platform":"github","type":"tutorials","tags":["utopian-io","utopian-io","tutorial","java","eclipse"],"users":["drewie"],"links":["https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067430/hnl07w1kyhkh0sdzccwh.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067731/mup6poxzabmcaxzm3yqu.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068433/mp8hhx3pirl7qqssng0w.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068784/ay0l6otaa9ktm2pctbpv.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069063/njskjts7behabjn7winf.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069177/p9dngye2o2vcrrsnvpby.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069187/vj5qvigzy9h0qwpgejkp.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069194/exh7tpe6zlfzzbatavez.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069201/klf4yrsfhheiyvbbfsdu.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069276/bpab5og1qesejuzul3zi.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069333/ie14yhxyxav0gbz9mxuj.png","https://utopian.io/utopian-io/@drewie/making-form-applet-and-adding-checkboxs-on-java","https://utopian.io/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java"],"image":["https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067430/hnl07w1kyhkh0sdzccwh.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067731/mup6poxzabmcaxzm3yqu.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068433/mp8hhx3pirl7qqssng0w.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068784/ay0l6otaa9ktm2pctbpv.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069063/njskjts7behabjn7winf.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069177/p9dngye2o2vcrrsnvpby.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069187/vj5qvigzy9h0qwpgejkp.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069194/exh7tpe6zlfzzbatavez.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069201/klf4yrsfhheiyvbbfsdu.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069276/bpab5og1qesejuzul3zi.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069333/ie14yhxyxav0gbz9mxuj.png"],"moderator":{"account":"amosbastian","time":"2018-02-19T21:21:58.768Z","flagged":true,"reviewed":false,"pending":false},"questions":[],"score":0} |
| Transaction Info | Block #20016883/Trx 69fb7f68da8b5217477553e59fdd94dd02eb3dcd |
View Raw JSON Data
{
"trx_id": "69fb7f68da8b5217477553e59fdd94dd02eb3dcd",
"block": 20016883,
"trx_in_block": 7,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-19T21:22:00",
"op": [
"comment",
{
"parent_author": "",
"parent_permlink": "utopian-io",
"author": "drewie",
"permlink": "tic-tac-toe-game-user-vs-computer-on-java",
"title": "Tic-Tac-Toe Game [ User Vs Computer ] On Java",
"body": "\n#### What Will I Learn?\n\n- You will learn how to use variables,loops and arrays\n- You will learn how to make a tic tac toe game\n\n#### Requirements\n\n- Knowledge of coding on Java and Eclipse\n- Eclipse and Java must be setted up on the computer.\n\n#### Difficulty\n\n- Intermediate\n\n\n#### Tutorial Contents\n\nHello,in this tutorial we are going to make a player vs computer tic-tac-toe game by using java on eclipse.First i defined my needed one line library then named my program.After i defined integer type variables in a,b,c which is my rows and a1,c3 etc. is my columns,then i defined a new static named \"Scanner\" to scan where user and computer is choosed to make their move.\n\n```\nimport java.util.Scanner;\n\n\npublic class TicTacToeGameByDrewie\n{\n\nstatic int A1, A2, A3, B1, B2, B3, C1, C2, C3;\n\nstatic Scanner sc = new Scanner(System.in);\n\npublic static void main(String[] args)\n{\n ```\nIn the next step i defined my strings to welcome the user,and show user moves.In the below i used Boolean,this function is used to define True/false situation.GameisWon variable is false at that line because game has **not** started yet.\n\n```\npublic static void main(String[] args)\n{\nString prompt = \"Welcome to Tic-Tac-Toe Game. Please enter your first move: \";\nString humanMove = \"\";\nString computerMove = \"\";\nboolean gameIsWon = false; \n ```\n\nNow we are going to use for and if loop together.We made i<=9 because in this game there can be maximum 9 moves.First we define human move.\"Prompt\" is used to get input from the user so we are asking user to make the first movement.\n\nUpdateboard is used after user made his/her move,we put in on the screen and then we display is with using \"displayboard\".We do same thing for the computer in the below and if the user won we use our \"gameiswon\" class to find out.We define it on user and computers code lines and use if loop to check who won with using \"true\".In the last line we check if it is draw and if noone won we print out to say \"it is a draw\".\n\n```\nfor (int i = 1; i <=9; i++)\n{\nhumanMove = getMove(prompt);\nupdateBoard(humanMove, 1);\ndisplayBoard();\nif (isGameWon())\n{\nSystem.out.println(\"You beated me!\");\ngameIsWon = true;\nbreak;\n}\n\nif (i < 9)\n{\ncomputerMove = getComputerMove();\nSystem.out.println(\"I will play at \" + computerMove);\nupdateBoard(computerMove, 2);\ndisplayBoard();\nif (isGameWon())\n{\nSystem.out.println(\"I beated you!\");\ngameIsWon = true;\nbreak;\n}\nprompt = \"Please enter your next move: \";\ni++;\n}\n}\nif (!gameIsWon)\nSystem.out.println(\"It's a draw!\");\n}\n ```\n\n\nNow game is beggining.First of all we create a class to get users move if user make a wrong input for example \"a4\" this is a wrong input,we will warn user.Then we create another class,if the input is valid we define all the rows and columns with using \"equalsignorecase\" this method is basically compares the strings that you have defined.We equal them all to zero so if the user or computer make a movement it will change.\n\n```\npublic static String getMove(String prompt)\n\t{\n\t\tString play;\n\t\tSystem.out.print(prompt);\n\t\tdo\n\t\t{\n\t\t\tplay = sc.nextLine();\n\t\t\tif (!isValidPlay(play))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"That is not a valid play.\");\n\t\t\t}\n\t\t} while (!isValidPlay(play));\n\t\treturn play;\n\t}\n\n\tpublic static boolean isValidPlay(String play)\n\t{\n\t\tif (play.equalsIgnoreCase(\"A1\") & A1 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"A2\") & A2 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"A3\") & A3 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"B1\") & B1 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"B2\") & B2 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"B3\") & B3 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"C1\") & C1 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"C2\") & C2 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"C3\") & C3 == 0)\n\t\t\treturn true;\n\t\treturn false;\n\t}\n \n ```\n\n\n\nNow until here user and computer has made their move now we have to show it to user and update it.To do this we use \"equalsignorecase\" again.Basically we define users movement to the program with evaluating all the possibilities.\n\n```\npublic static void updateBoard(String play, int player)\n\t{\n\t\tif (play.equalsIgnoreCase(\"A1\"))\n\t\t\tA1 = player;\n\t\tif (play.equalsIgnoreCase(\"A2\"))\n\t\t\tA2 = player;\n\t\tif (play.equalsIgnoreCase(\"A3\"))\n\t\t\tA3 = player;\n\t\tif (play.equalsIgnoreCase(\"B1\"))\n\t\t\tB1 = player;\n\t\tif (play.equalsIgnoreCase(\"B2\"))\n\t\t\tB2 = player;\n\t\tif (play.equalsIgnoreCase(\"B3\"))\n\t\t\tB3 = player;\n\t\tif (play.equalsIgnoreCase(\"C1\"))\n\t\t\tC1 = player;\n\t\tif (play.equalsIgnoreCase(\"C2\"))\n\t\t\tC2 = player;\n\t\tif (play.equalsIgnoreCase(\"C3\"))\n\t\t\tC3 = player;\n\t}\n \n ```\n\nIn this step because of we haven't made an applet,we have to draw a tic-tac-toe game for the visuality.With using system.print.out as you know we asked user to make first move above after user choose where to move for example \"a1\" this lines will draw a X to a1.\n\nThen we must define to the program who is playing.To do that we create another class and as you know we defined \"square\".This is to find out whos turn is it.If it is users turn program will draw X if not it will draw \"O\".\n\n```\n public static void displayBoard()\n\t{\n\t\tString line = \"\";\n\t\tSystem.out.println();\n\t\tline = \" \" + getXO(A1) + \" | \" + getXO(A2) + \" | \" + getXO(A3);\n\t\tSystem.out.println(line);\n\t\tSystem.out.println(\"-----------\");\n\t\tline = \" \" + getXO(B1) + \" | \" + getXO(B2) + \" | \" + getXO(B3);\n\t\tSystem.out.println(line);\n\t\tSystem.out.println(\"-----------\");\n\t\tline = \" \" + getXO(C1) + \" | \" + getXO(C2) + \" | \" + getXO(C3);\n\t\tSystem.out.println(line);\n\t\tSystem.out.println();\n\t}\n\n\tpublic static String getXO(int square)\n\t{\n\t\tif (square == 1)\n\t\t\treturn \"X\";\n\t\tif (square == 2)\n\t\t\treturn \"O\";\n\t\treturn \" \";\n\t} \n ```\n\n\n\nIn the final step we do same thing we did for the user.We define computers move to the program with creating a class and using if loop to evaluate the possibilities and define each line and column and equal to zero.\n\nThen we create another class to define the possibilites of winning.You can win with making 3 line cross,vertical or horizontal so we define all the possibilities and if user or computer made it through the 3 lines correctly we use \"return true\" which will show the message whoever won.It can be a draw so if any of cases didn't happen it will return false \"draw\" message.\n\n```\npublic static String getComputerMove()\n\t{\n\t\tif (A1 == 0)\n\t\t\treturn \"A1\";\n\t\tif (A2 == 0)\n\t\t\treturn \"A2\";\n\t\tif (A3 == 0)\n\t\t\treturn \"A3\";\n\t\tif (B1 == 0)\n\t\t\treturn \"B1\";\n\t\tif (B2 == 0)\n\t\t\treturn \"B2\";\n\t\tif (B3 == 0)\n\t\t\treturn \"B3\";\n\t\tif (C1 == 0)\n\t\t\treturn \"C1\";\n\t\tif (C2 == 0)\n\t\t\treturn \"C2\";\n\t\tif (C3 == 0)\n\t\t\treturn \"C3\";\n\t\treturn \"\";\n\t}\n\n\tpublic static boolean isGameWon()\n\t{\n\t\tif (isRowWon(A1, A2, A3))\n\t\t\treturn true;\n\t\tif (isRowWon(B1, B2, B3))\n\t\t\treturn true;\n\t\tif (isRowWon(C1, C2, C3))\n\t\t\treturn true;\n\t\tif (isRowWon(A1, B1, C1))\n\t\t\treturn true;\n\t\tif (isRowWon(A2, B2, C2))\n\t\t\treturn true;\n\t\tif (isRowWon(A3, B3, C3))\n\t\t\treturn true;\n\t\tif (isRowWon(A1, B2, C3))\n\t\t\treturn true;\n\t\tif (isRowWon(A3, B2, C1))\n\t\t\treturn true;\n\t\treturn false;\n\t}\npublic static boolean isRowWon(int a, int b, int c)\n\t{\n\t\treturn ((a == b) & (a == c) & (a != 0));\n\t}\n}\n ```\n\n\n#### Whole code with the screenshots and output\n\n```\n import java.util.Scanner;\n\npublic class TicTacToeGameByDrewie\n{\n\n\tstatic int A1, A2, A3, B1, B2, B3, C1, C2, C3;\n\n\tstatic Scanner sc = new Scanner(System.in);\n\n\tpublic static void main(String[] args)\n\t{\n\t\tString prompt = \"Welcome to Tic-Tac-Toe Game. Please enter your first move: \";\n\t\tString humanMove = \"\";\n\t\tString computerMove = \"\";\n\t\tboolean gameIsWon = false;\n\n\n\t\tfor (int i = 1; i <=9; i++)\n\t\t{\n\n\t\t\thumanMove = getMove(prompt);\n\t\t\tupdateBoard(humanMove, 1);\n\t\t\tdisplayBoard();\n\t\t\tif (isGameWon())\n\t\t\t{\n\t\t\t\tSystem.out.println(\"You beated me!\");\n\t\t\t\tgameIsWon = true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (i < 9)\n\t\t\t{\n\t\t\t\tcomputerMove = getComputerMove();\n\t\t\t\tSystem.out.println(\"I will play at \" + computerMove);\n\t\t\t\tupdateBoard(computerMove, 2);\n\t\t\t\tdisplayBoard();\n\t\t\t\tif (isGameWon())\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"I beated you!\");\n\t\t\t\t\tgameIsWon = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tprompt = \"Please enter your next move: \";\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tif (!gameIsWon)\n\t\t\tSystem.out.println(\"It's a draw!\");\n\t}\n\n\tpublic static String getMove(String prompt)\n\t{\n\t\tString play;\n\t\tSystem.out.print(prompt);\n\t\tdo\n\t\t{\n\t\t\tplay = sc.nextLine();\n\t\t\tif (!isValidPlay(play))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"That is not a valid play.\");\n\t\t\t}\n\t\t} while (!isValidPlay(play));\n\t\treturn play;\n\t}\n\n\tpublic static boolean isValidPlay(String play)\n\t{\n\t\tif (play.equalsIgnoreCase(\"A1\") & A1 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"A2\") & A2 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"A3\") & A3 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"B1\") & B1 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"B2\") & B2 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"B3\") & B3 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"C1\") & C1 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"C2\") & C2 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"C3\") & C3 == 0)\n\t\t\treturn true;\n\t\treturn false;\n\t}\n\n\tpublic static void updateBoard(String play, int player)\n\t{\n\t\tif (play.equalsIgnoreCase(\"A1\"))\n\t\t\tA1 = player;\n\t\tif (play.equalsIgnoreCase(\"A2\"))\n\t\t\tA2 = player;\n\t\tif (play.equalsIgnoreCase(\"A3\"))\n\t\t\tA3 = player;\n\t\tif (play.equalsIgnoreCase(\"B1\"))\n\t\t\tB1 = player;\n\t\tif (play.equalsIgnoreCase(\"B2\"))\n\t\t\tB2 = player;\n\t\tif (play.equalsIgnoreCase(\"B3\"))\n\t\t\tB3 = player;\n\t\tif (play.equalsIgnoreCase(\"C1\"))\n\t\t\tC1 = player;\n\t\tif (play.equalsIgnoreCase(\"C2\"))\n\t\t\tC2 = player;\n\t\tif (play.equalsIgnoreCase(\"C3\"))\n\t\t\tC3 = player;\n\t}\n\n\tpublic static void displayBoard()\n\t{\n\t\tString line = \"\";\n\t\tSystem.out.println();\n\t\tline = \" \" + getXO(A1) + \" | \" + getXO(A2) + \" | \" + getXO(A3);\n\t\tSystem.out.println(line);\n\t\tSystem.out.println(\"-----------\");\n\t\tline = \" \" + getXO(B1) + \" | \" + getXO(B2) + \" | \" + getXO(B3);\n\t\tSystem.out.println(line);\n\t\tSystem.out.println(\"-----------\");\n\t\tline = \" \" + getXO(C1) + \" | \" + getXO(C2) + \" | \" + getXO(C3);\n\t\tSystem.out.println(line);\n\t\tSystem.out.println();\n\t}\n\n\tpublic static String getXO(int square)\n\t{\n\t\tif (square == 1)\n\t\t\treturn \"X\";\n\t\tif (square == 2)\n\t\t\treturn \"O\";\n\t\treturn \" \";\n\t}\n\n\tpublic static String getComputerMove()\n\t{\n\t\tif (A1 == 0)\n\t\t\treturn \"A1\";\n\t\tif (A2 == 0)\n\t\t\treturn \"A2\";\n\t\tif (A3 == 0)\n\t\t\treturn \"A3\";\n\t\tif (B1 == 0)\n\t\t\treturn \"B1\";\n\t\tif (B2 == 0)\n\t\t\treturn \"B2\";\n\t\tif (B3 == 0)\n\t\t\treturn \"B3\";\n\t\tif (C1 == 0)\n\t\t\treturn \"C1\";\n\t\tif (C2 == 0)\n\t\t\treturn \"C2\";\n\t\tif (C3 == 0)\n\t\t\treturn \"C3\";\n\t\treturn \"\";\n\t}\n\n\tpublic static boolean isGameWon()\n\t{\n\t\tif (isRowWon(A1, A2, A3))\n\t\t\treturn true;\n\t\tif (isRowWon(B1, B2, B3))\n\t\t\treturn true;\n\t\tif (isRowWon(C1, C2, C3))\n\t\t\treturn true;\n\t\tif (isRowWon(A1, B1, C1))\n\t\t\treturn true;\n\t\tif (isRowWon(A2, B2, C2))\n\t\t\treturn true;\n\t\tif (isRowWon(A3, B3, C3))\n\t\t\treturn true;\n\t\tif (isRowWon(A1, B2, C3))\n\t\t\treturn true;\n\t\tif (isRowWon(A3, B2, C1))\n\t\t\treturn true;\n\t\treturn false;\n\t}\n\n\tpublic static boolean isRowWon(int a, int b, int c)\n\t{\n\t\treturn ((a == b) & (a == c) & (a != 0));\n\t}\n}\n\n \n ```\n\n\n\n\n\n\n\n\n\n\n\n#### Outputs\n\n\n\n\n\n\n#### Curriculum\n\n- [First Tutorial](https://utopian.io/utopian-io/@drewie/making-form-applet-and-adding-checkboxs-on-java)\n- [Second Tutorial](https://utopian.io/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java)\n\n \n\n<br /><hr/><em>Posted on <a href=\"https://utopian.io/utopian-io/@drewie/tic-tac-toe-game-user-vs-computer-on-java\">Utopian.io - Rewarding Open Source Contributors</a></em><hr/>",
"json_metadata": "{\"community\":\"utopian\",\"app\":\"utopian/1.0.0\",\"format\":\"markdown\",\"repository\":{\"id\":5360933,\"name\":\"openjdk\",\"full_name\":\"dmlloyd/openjdk\",\"html_url\":\"https://github.com/dmlloyd/openjdk\",\"fork\":false,\"owner\":{\"login\":\"dmlloyd\"}},\"pullRequests\":[],\"platform\":\"github\",\"type\":\"tutorials\",\"tags\":[\"utopian-io\",\"utopian-io\",\"tutorial\",\"java\",\"eclipse\"],\"users\":[\"drewie\"],\"links\":[\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067430/hnl07w1kyhkh0sdzccwh.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067731/mup6poxzabmcaxzm3yqu.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068433/mp8hhx3pirl7qqssng0w.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068784/ay0l6otaa9ktm2pctbpv.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069063/njskjts7behabjn7winf.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069177/p9dngye2o2vcrrsnvpby.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069187/vj5qvigzy9h0qwpgejkp.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069194/exh7tpe6zlfzzbatavez.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069201/klf4yrsfhheiyvbbfsdu.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069276/bpab5og1qesejuzul3zi.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069333/ie14yhxyxav0gbz9mxuj.png\",\"https://utopian.io/utopian-io/@drewie/making-form-applet-and-adding-checkboxs-on-java\",\"https://utopian.io/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java\"],\"image\":[\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067430/hnl07w1kyhkh0sdzccwh.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067731/mup6poxzabmcaxzm3yqu.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068433/mp8hhx3pirl7qqssng0w.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068784/ay0l6otaa9ktm2pctbpv.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069063/njskjts7behabjn7winf.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069177/p9dngye2o2vcrrsnvpby.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069187/vj5qvigzy9h0qwpgejkp.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069194/exh7tpe6zlfzzbatavez.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069201/klf4yrsfhheiyvbbfsdu.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069276/bpab5og1qesejuzul3zi.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069333/ie14yhxyxav0gbz9mxuj.png\"],\"moderator\":{\"account\":\"amosbastian\",\"time\":\"2018-02-19T21:21:58.768Z\",\"flagged\":true,\"reviewed\":false,\"pending\":false},\"questions\":[],\"score\":0}"
}
]
}drewiepublished a new post: tic-tac-toe-game-user-vs-computer-on-java2018/02/19 21:21:57
drewiepublished a new post: tic-tac-toe-game-user-vs-computer-on-java
2018/02/19 21:21:57
| parent author | |
| parent permlink | utopian-io |
| author | drewie |
| permlink | tic-tac-toe-game-user-vs-computer-on-java |
| title | Tic-Tac-Toe Game [ User Vs Computer ] On Java |
| body | #### What Will I Learn? - You will learn how to use variables,loops and arrays - You will learn how to make a tic tac toe game #### Requirements - Knowledge of coding on Java and Eclipse - Eclipse and Java must be setted up on the computer. #### Difficulty - Intermediate #### Tutorial Contents Hello,in this tutorial we are going to make a player vs computer tic-tac-toe game by using java on eclipse.First i defined my needed one line library then named my program.After i defined integer type variables in a,b,c which is my rows and a1,c3 etc. is my columns,then i defined a new static named "Scanner" to scan where user and computer is choosed to make their move. ``` import java.util.Scanner; public class TicTacToeGameByDrewie { static int A1, A2, A3, B1, B2, B3, C1, C2, C3; static Scanner sc = new Scanner(System.in); public static void main(String[] args) { ``` In the next step i defined my strings to welcome the user,and show user moves.In the below i used Boolean,this function is used to define True/false situation.GameisWon variable is false at that line because game has **not** started yet. ``` public static void main(String[] args) { String prompt = "Welcome to Tic-Tac-Toe Game. Please enter your first move: "; String humanMove = ""; String computerMove = ""; boolean gameIsWon = false; ``` Now we are going to use for and if loop together.We made i<=9 because in this game there can be maximum 9 moves.First we define human move."Prompt" is used to get input from the user so we are asking user to make the first movement. Updateboard is used after user made his/her move,we put in on the screen and then we display is with using "displayboard".We do same thing for the computer in the below and if the user won we use our "gameiswon" class to find out.We define it on user and computers code lines and use if loop to check who won with using "true".In the last line we check if it is draw and if noone won we print out to say "it is a draw". ``` for (int i = 1; i <=9; i++) { humanMove = getMove(prompt); updateBoard(humanMove, 1); displayBoard(); if (isGameWon()) { System.out.println("You beated me!"); gameIsWon = true; break; } if (i < 9) { computerMove = getComputerMove(); System.out.println("I will play at " + computerMove); updateBoard(computerMove, 2); displayBoard(); if (isGameWon()) { System.out.println("I beated you!"); gameIsWon = true; break; } prompt = "Please enter your next move: "; i++; } } if (!gameIsWon) System.out.println("It's a draw!"); } ```  Now game is beggining.First of all we create a class to get users move if user make a wrong input for example "a4" this is a wrong input,we will warn user.Then we create another class,if the input is valid we define all the rows and columns with using "equalsignorecase" this method is basically compares the strings that you have defined.We equal them all to zero so if the user or computer make a movement it will change. ``` public static String getMove(String prompt) { String play; System.out.print(prompt); do { play = sc.nextLine(); if (!isValidPlay(play)) { System.out.println("That is not a valid play."); } } while (!isValidPlay(play)); return play; } public static boolean isValidPlay(String play) { if (play.equalsIgnoreCase("A1") & A1 == 0) return true; if (play.equalsIgnoreCase("A2") & A2 == 0) return true; if (play.equalsIgnoreCase("A3") & A3 == 0) return true; if (play.equalsIgnoreCase("B1") & B1 == 0) return true; if (play.equalsIgnoreCase("B2") & B2 == 0) return true; if (play.equalsIgnoreCase("B3") & B3 == 0) return true; if (play.equalsIgnoreCase("C1") & C1 == 0) return true; if (play.equalsIgnoreCase("C2") & C2 == 0) return true; if (play.equalsIgnoreCase("C3") & C3 == 0) return true; return false; } ```  Now until here user and computer has made their move now we have to show it to user and update it.To do this we use "equalsignorecase" again.Basically we define users movement to the program with evaluating all the possibilities. ``` public static void updateBoard(String play, int player) { if (play.equalsIgnoreCase("A1")) A1 = player; if (play.equalsIgnoreCase("A2")) A2 = player; if (play.equalsIgnoreCase("A3")) A3 = player; if (play.equalsIgnoreCase("B1")) B1 = player; if (play.equalsIgnoreCase("B2")) B2 = player; if (play.equalsIgnoreCase("B3")) B3 = player; if (play.equalsIgnoreCase("C1")) C1 = player; if (play.equalsIgnoreCase("C2")) C2 = player; if (play.equalsIgnoreCase("C3")) C3 = player; } ``` In this step because of we haven't made an applet,we have to draw a tic-tac-toe game for the visuality.With using system.print.out as you know we asked user to make first move above after user choose where to move for example "a1" this lines will draw a X to a1. Then we must define to the program who is playing.To do that we create another class and as you know we defined "square".This is to find out whos turn is it.If it is users turn program will draw X if not it will draw "O". ``` public static void displayBoard() { String line = ""; System.out.println(); line = " " + getXO(A1) + " | " + getXO(A2) + " | " + getXO(A3); System.out.println(line); System.out.println("-----------"); line = " " + getXO(B1) + " | " + getXO(B2) + " | " + getXO(B3); System.out.println(line); System.out.println("-----------"); line = " " + getXO(C1) + " | " + getXO(C2) + " | " + getXO(C3); System.out.println(line); System.out.println(); } public static String getXO(int square) { if (square == 1) return "X"; if (square == 2) return "O"; return " "; } ```  In the final step we do same thing we did for the user.We define computers move to the program with creating a class and using if loop to evaluate the possibilities and define each line and column and equal to zero. Then we create another class to define the possibilites of winning.You can win with making 3 line cross,vertical or horizontal so we define all the possibilities and if user or computer made it through the 3 lines correctly we use "return true" which will show the message whoever won.It can be a draw so if any of cases didn't happen it will return false "draw" message. ``` public static String getComputerMove() { if (A1 == 0) return "A1"; if (A2 == 0) return "A2"; if (A3 == 0) return "A3"; if (B1 == 0) return "B1"; if (B2 == 0) return "B2"; if (B3 == 0) return "B3"; if (C1 == 0) return "C1"; if (C2 == 0) return "C2"; if (C3 == 0) return "C3"; return ""; } public static boolean isGameWon() { if (isRowWon(A1, A2, A3)) return true; if (isRowWon(B1, B2, B3)) return true; if (isRowWon(C1, C2, C3)) return true; if (isRowWon(A1, B1, C1)) return true; if (isRowWon(A2, B2, C2)) return true; if (isRowWon(A3, B3, C3)) return true; if (isRowWon(A1, B2, C3)) return true; if (isRowWon(A3, B2, C1)) return true; return false; } public static boolean isRowWon(int a, int b, int c) { return ((a == b) & (a == c) & (a != 0)); } } ```  #### Whole code with the screenshots and output ``` import java.util.Scanner; public class TicTacToeGameByDrewie { static int A1, A2, A3, B1, B2, B3, C1, C2, C3; static Scanner sc = new Scanner(System.in); public static void main(String[] args) { String prompt = "Welcome to Tic-Tac-Toe Game. Please enter your first move: "; String humanMove = ""; String computerMove = ""; boolean gameIsWon = false; for (int i = 1; i <=9; i++) { humanMove = getMove(prompt); updateBoard(humanMove, 1); displayBoard(); if (isGameWon()) { System.out.println("You beated me!"); gameIsWon = true; break; } if (i < 9) { computerMove = getComputerMove(); System.out.println("I will play at " + computerMove); updateBoard(computerMove, 2); displayBoard(); if (isGameWon()) { System.out.println("I beated you!"); gameIsWon = true; break; } prompt = "Please enter your next move: "; i++; } } if (!gameIsWon) System.out.println("It's a draw!"); } public static String getMove(String prompt) { String play; System.out.print(prompt); do { play = sc.nextLine(); if (!isValidPlay(play)) { System.out.println("That is not a valid play."); } } while (!isValidPlay(play)); return play; } public static boolean isValidPlay(String play) { if (play.equalsIgnoreCase("A1") & A1 == 0) return true; if (play.equalsIgnoreCase("A2") & A2 == 0) return true; if (play.equalsIgnoreCase("A3") & A3 == 0) return true; if (play.equalsIgnoreCase("B1") & B1 == 0) return true; if (play.equalsIgnoreCase("B2") & B2 == 0) return true; if (play.equalsIgnoreCase("B3") & B3 == 0) return true; if (play.equalsIgnoreCase("C1") & C1 == 0) return true; if (play.equalsIgnoreCase("C2") & C2 == 0) return true; if (play.equalsIgnoreCase("C3") & C3 == 0) return true; return false; } public static void updateBoard(String play, int player) { if (play.equalsIgnoreCase("A1")) A1 = player; if (play.equalsIgnoreCase("A2")) A2 = player; if (play.equalsIgnoreCase("A3")) A3 = player; if (play.equalsIgnoreCase("B1")) B1 = player; if (play.equalsIgnoreCase("B2")) B2 = player; if (play.equalsIgnoreCase("B3")) B3 = player; if (play.equalsIgnoreCase("C1")) C1 = player; if (play.equalsIgnoreCase("C2")) C2 = player; if (play.equalsIgnoreCase("C3")) C3 = player; } public static void displayBoard() { String line = ""; System.out.println(); line = " " + getXO(A1) + " | " + getXO(A2) + " | " + getXO(A3); System.out.println(line); System.out.println("-----------"); line = " " + getXO(B1) + " | " + getXO(B2) + " | " + getXO(B3); System.out.println(line); System.out.println("-----------"); line = " " + getXO(C1) + " | " + getXO(C2) + " | " + getXO(C3); System.out.println(line); System.out.println(); } public static String getXO(int square) { if (square == 1) return "X"; if (square == 2) return "O"; return " "; } public static String getComputerMove() { if (A1 == 0) return "A1"; if (A2 == 0) return "A2"; if (A3 == 0) return "A3"; if (B1 == 0) return "B1"; if (B2 == 0) return "B2"; if (B3 == 0) return "B3"; if (C1 == 0) return "C1"; if (C2 == 0) return "C2"; if (C3 == 0) return "C3"; return ""; } public static boolean isGameWon() { if (isRowWon(A1, A2, A3)) return true; if (isRowWon(B1, B2, B3)) return true; if (isRowWon(C1, C2, C3)) return true; if (isRowWon(A1, B1, C1)) return true; if (isRowWon(A2, B2, C2)) return true; if (isRowWon(A3, B3, C3)) return true; if (isRowWon(A1, B2, C3)) return true; if (isRowWon(A3, B2, C1)) return true; return false; } public static boolean isRowWon(int a, int b, int c) { return ((a == b) & (a == c) & (a != 0)); } } ```      #### Outputs   #### Curriculum - [First Tutorial](https://utopian.io/utopian-io/@drewie/making-form-applet-and-adding-checkboxs-on-java) - [Second Tutorial](https://utopian.io/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java) <br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@drewie/tic-tac-toe-game-user-vs-computer-on-java">Utopian.io - Rewarding Open Source Contributors</a></em><hr/> |
| json metadata | {"community":"utopian","app":"utopian/1.0.0","format":"markdown","repository":{"id":5360933,"name":"openjdk","full_name":"dmlloyd/openjdk","html_url":"https://github.com/dmlloyd/openjdk","fork":false,"owner":{"login":"dmlloyd"}},"pullRequests":[],"platform":"github","type":"tutorials","tags":["utopian-io","utopian-io","tutorial","java","eclipse"],"users":["drewie"],"links":["https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067430/hnl07w1kyhkh0sdzccwh.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067731/mup6poxzabmcaxzm3yqu.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068433/mp8hhx3pirl7qqssng0w.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068784/ay0l6otaa9ktm2pctbpv.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069063/njskjts7behabjn7winf.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069177/p9dngye2o2vcrrsnvpby.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069187/vj5qvigzy9h0qwpgejkp.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069194/exh7tpe6zlfzzbatavez.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069201/klf4yrsfhheiyvbbfsdu.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069276/bpab5og1qesejuzul3zi.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069333/ie14yhxyxav0gbz9mxuj.png","https://utopian.io/utopian-io/@drewie/making-form-applet-and-adding-checkboxs-on-java","https://utopian.io/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java"],"image":["https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067430/hnl07w1kyhkh0sdzccwh.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067731/mup6poxzabmcaxzm3yqu.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068433/mp8hhx3pirl7qqssng0w.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068784/ay0l6otaa9ktm2pctbpv.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069063/njskjts7behabjn7winf.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069177/p9dngye2o2vcrrsnvpby.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069187/vj5qvigzy9h0qwpgejkp.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069194/exh7tpe6zlfzzbatavez.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069201/klf4yrsfhheiyvbbfsdu.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069276/bpab5og1qesejuzul3zi.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069333/ie14yhxyxav0gbz9mxuj.png"],"moderator":{"account":"amosbastian","time":"2018-02-19T21:21:55.357Z","flagged":true,"reviewed":false,"pending":false},"questions":[],"score":0} |
| Transaction Info | Block #20016882/Trx 72934ca749ee1575c190672feddb15cbae76fe2d |
View Raw JSON Data
{
"trx_id": "72934ca749ee1575c190672feddb15cbae76fe2d",
"block": 20016882,
"trx_in_block": 8,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-19T21:21:57",
"op": [
"comment",
{
"parent_author": "",
"parent_permlink": "utopian-io",
"author": "drewie",
"permlink": "tic-tac-toe-game-user-vs-computer-on-java",
"title": "Tic-Tac-Toe Game [ User Vs Computer ] On Java",
"body": "\n#### What Will I Learn?\n\n- You will learn how to use variables,loops and arrays\n- You will learn how to make a tic tac toe game\n\n#### Requirements\n\n- Knowledge of coding on Java and Eclipse\n- Eclipse and Java must be setted up on the computer.\n\n#### Difficulty\n\n- Intermediate\n\n\n#### Tutorial Contents\n\nHello,in this tutorial we are going to make a player vs computer tic-tac-toe game by using java on eclipse.First i defined my needed one line library then named my program.After i defined integer type variables in a,b,c which is my rows and a1,c3 etc. is my columns,then i defined a new static named \"Scanner\" to scan where user and computer is choosed to make their move.\n\n```\nimport java.util.Scanner;\n\n\npublic class TicTacToeGameByDrewie\n{\n\nstatic int A1, A2, A3, B1, B2, B3, C1, C2, C3;\n\nstatic Scanner sc = new Scanner(System.in);\n\npublic static void main(String[] args)\n{\n ```\nIn the next step i defined my strings to welcome the user,and show user moves.In the below i used Boolean,this function is used to define True/false situation.GameisWon variable is false at that line because game has **not** started yet.\n\n```\npublic static void main(String[] args)\n{\nString prompt = \"Welcome to Tic-Tac-Toe Game. Please enter your first move: \";\nString humanMove = \"\";\nString computerMove = \"\";\nboolean gameIsWon = false; \n ```\n\nNow we are going to use for and if loop together.We made i<=9 because in this game there can be maximum 9 moves.First we define human move.\"Prompt\" is used to get input from the user so we are asking user to make the first movement.\n\nUpdateboard is used after user made his/her move,we put in on the screen and then we display is with using \"displayboard\".We do same thing for the computer in the below and if the user won we use our \"gameiswon\" class to find out.We define it on user and computers code lines and use if loop to check who won with using \"true\".In the last line we check if it is draw and if noone won we print out to say \"it is a draw\".\n\n```\nfor (int i = 1; i <=9; i++)\n{\nhumanMove = getMove(prompt);\nupdateBoard(humanMove, 1);\ndisplayBoard();\nif (isGameWon())\n{\nSystem.out.println(\"You beated me!\");\ngameIsWon = true;\nbreak;\n}\n\nif (i < 9)\n{\ncomputerMove = getComputerMove();\nSystem.out.println(\"I will play at \" + computerMove);\nupdateBoard(computerMove, 2);\ndisplayBoard();\nif (isGameWon())\n{\nSystem.out.println(\"I beated you!\");\ngameIsWon = true;\nbreak;\n}\nprompt = \"Please enter your next move: \";\ni++;\n}\n}\nif (!gameIsWon)\nSystem.out.println(\"It's a draw!\");\n}\n ```\n\n\nNow game is beggining.First of all we create a class to get users move if user make a wrong input for example \"a4\" this is a wrong input,we will warn user.Then we create another class,if the input is valid we define all the rows and columns with using \"equalsignorecase\" this method is basically compares the strings that you have defined.We equal them all to zero so if the user or computer make a movement it will change.\n\n```\npublic static String getMove(String prompt)\n\t{\n\t\tString play;\n\t\tSystem.out.print(prompt);\n\t\tdo\n\t\t{\n\t\t\tplay = sc.nextLine();\n\t\t\tif (!isValidPlay(play))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"That is not a valid play.\");\n\t\t\t}\n\t\t} while (!isValidPlay(play));\n\t\treturn play;\n\t}\n\n\tpublic static boolean isValidPlay(String play)\n\t{\n\t\tif (play.equalsIgnoreCase(\"A1\") & A1 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"A2\") & A2 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"A3\") & A3 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"B1\") & B1 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"B2\") & B2 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"B3\") & B3 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"C1\") & C1 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"C2\") & C2 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"C3\") & C3 == 0)\n\t\t\treturn true;\n\t\treturn false;\n\t}\n \n ```\n\n\n\nNow until here user and computer has made their move now we have to show it to user and update it.To do this we use \"equalsignorecase\" again.Basically we define users movement to the program with evaluating all the possibilities.\n\n```\npublic static void updateBoard(String play, int player)\n\t{\n\t\tif (play.equalsIgnoreCase(\"A1\"))\n\t\t\tA1 = player;\n\t\tif (play.equalsIgnoreCase(\"A2\"))\n\t\t\tA2 = player;\n\t\tif (play.equalsIgnoreCase(\"A3\"))\n\t\t\tA3 = player;\n\t\tif (play.equalsIgnoreCase(\"B1\"))\n\t\t\tB1 = player;\n\t\tif (play.equalsIgnoreCase(\"B2\"))\n\t\t\tB2 = player;\n\t\tif (play.equalsIgnoreCase(\"B3\"))\n\t\t\tB3 = player;\n\t\tif (play.equalsIgnoreCase(\"C1\"))\n\t\t\tC1 = player;\n\t\tif (play.equalsIgnoreCase(\"C2\"))\n\t\t\tC2 = player;\n\t\tif (play.equalsIgnoreCase(\"C3\"))\n\t\t\tC3 = player;\n\t}\n \n ```\n\nIn this step because of we haven't made an applet,we have to draw a tic-tac-toe game for the visuality.With using system.print.out as you know we asked user to make first move above after user choose where to move for example \"a1\" this lines will draw a X to a1.\n\nThen we must define to the program who is playing.To do that we create another class and as you know we defined \"square\".This is to find out whos turn is it.If it is users turn program will draw X if not it will draw \"O\".\n\n```\n public static void displayBoard()\n\t{\n\t\tString line = \"\";\n\t\tSystem.out.println();\n\t\tline = \" \" + getXO(A1) + \" | \" + getXO(A2) + \" | \" + getXO(A3);\n\t\tSystem.out.println(line);\n\t\tSystem.out.println(\"-----------\");\n\t\tline = \" \" + getXO(B1) + \" | \" + getXO(B2) + \" | \" + getXO(B3);\n\t\tSystem.out.println(line);\n\t\tSystem.out.println(\"-----------\");\n\t\tline = \" \" + getXO(C1) + \" | \" + getXO(C2) + \" | \" + getXO(C3);\n\t\tSystem.out.println(line);\n\t\tSystem.out.println();\n\t}\n\n\tpublic static String getXO(int square)\n\t{\n\t\tif (square == 1)\n\t\t\treturn \"X\";\n\t\tif (square == 2)\n\t\t\treturn \"O\";\n\t\treturn \" \";\n\t} \n ```\n\n\n\nIn the final step we do same thing we did for the user.We define computers move to the program with creating a class and using if loop to evaluate the possibilities and define each line and column and equal to zero.\n\nThen we create another class to define the possibilites of winning.You can win with making 3 line cross,vertical or horizontal so we define all the possibilities and if user or computer made it through the 3 lines correctly we use \"return true\" which will show the message whoever won.It can be a draw so if any of cases didn't happen it will return false \"draw\" message.\n\n```\npublic static String getComputerMove()\n\t{\n\t\tif (A1 == 0)\n\t\t\treturn \"A1\";\n\t\tif (A2 == 0)\n\t\t\treturn \"A2\";\n\t\tif (A3 == 0)\n\t\t\treturn \"A3\";\n\t\tif (B1 == 0)\n\t\t\treturn \"B1\";\n\t\tif (B2 == 0)\n\t\t\treturn \"B2\";\n\t\tif (B3 == 0)\n\t\t\treturn \"B3\";\n\t\tif (C1 == 0)\n\t\t\treturn \"C1\";\n\t\tif (C2 == 0)\n\t\t\treturn \"C2\";\n\t\tif (C3 == 0)\n\t\t\treturn \"C3\";\n\t\treturn \"\";\n\t}\n\n\tpublic static boolean isGameWon()\n\t{\n\t\tif (isRowWon(A1, A2, A3))\n\t\t\treturn true;\n\t\tif (isRowWon(B1, B2, B3))\n\t\t\treturn true;\n\t\tif (isRowWon(C1, C2, C3))\n\t\t\treturn true;\n\t\tif (isRowWon(A1, B1, C1))\n\t\t\treturn true;\n\t\tif (isRowWon(A2, B2, C2))\n\t\t\treturn true;\n\t\tif (isRowWon(A3, B3, C3))\n\t\t\treturn true;\n\t\tif (isRowWon(A1, B2, C3))\n\t\t\treturn true;\n\t\tif (isRowWon(A3, B2, C1))\n\t\t\treturn true;\n\t\treturn false;\n\t}\npublic static boolean isRowWon(int a, int b, int c)\n\t{\n\t\treturn ((a == b) & (a == c) & (a != 0));\n\t}\n}\n ```\n\n\n#### Whole code with the screenshots and output\n\n```\n import java.util.Scanner;\n\npublic class TicTacToeGameByDrewie\n{\n\n\tstatic int A1, A2, A3, B1, B2, B3, C1, C2, C3;\n\n\tstatic Scanner sc = new Scanner(System.in);\n\n\tpublic static void main(String[] args)\n\t{\n\t\tString prompt = \"Welcome to Tic-Tac-Toe Game. Please enter your first move: \";\n\t\tString humanMove = \"\";\n\t\tString computerMove = \"\";\n\t\tboolean gameIsWon = false;\n\n\n\t\tfor (int i = 1; i <=9; i++)\n\t\t{\n\n\t\t\thumanMove = getMove(prompt);\n\t\t\tupdateBoard(humanMove, 1);\n\t\t\tdisplayBoard();\n\t\t\tif (isGameWon())\n\t\t\t{\n\t\t\t\tSystem.out.println(\"You beated me!\");\n\t\t\t\tgameIsWon = true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (i < 9)\n\t\t\t{\n\t\t\t\tcomputerMove = getComputerMove();\n\t\t\t\tSystem.out.println(\"I will play at \" + computerMove);\n\t\t\t\tupdateBoard(computerMove, 2);\n\t\t\t\tdisplayBoard();\n\t\t\t\tif (isGameWon())\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"I beated you!\");\n\t\t\t\t\tgameIsWon = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tprompt = \"Please enter your next move: \";\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tif (!gameIsWon)\n\t\t\tSystem.out.println(\"It's a draw!\");\n\t}\n\n\tpublic static String getMove(String prompt)\n\t{\n\t\tString play;\n\t\tSystem.out.print(prompt);\n\t\tdo\n\t\t{\n\t\t\tplay = sc.nextLine();\n\t\t\tif (!isValidPlay(play))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"That is not a valid play.\");\n\t\t\t}\n\t\t} while (!isValidPlay(play));\n\t\treturn play;\n\t}\n\n\tpublic static boolean isValidPlay(String play)\n\t{\n\t\tif (play.equalsIgnoreCase(\"A1\") & A1 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"A2\") & A2 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"A3\") & A3 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"B1\") & B1 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"B2\") & B2 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"B3\") & B3 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"C1\") & C1 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"C2\") & C2 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"C3\") & C3 == 0)\n\t\t\treturn true;\n\t\treturn false;\n\t}\n\n\tpublic static void updateBoard(String play, int player)\n\t{\n\t\tif (play.equalsIgnoreCase(\"A1\"))\n\t\t\tA1 = player;\n\t\tif (play.equalsIgnoreCase(\"A2\"))\n\t\t\tA2 = player;\n\t\tif (play.equalsIgnoreCase(\"A3\"))\n\t\t\tA3 = player;\n\t\tif (play.equalsIgnoreCase(\"B1\"))\n\t\t\tB1 = player;\n\t\tif (play.equalsIgnoreCase(\"B2\"))\n\t\t\tB2 = player;\n\t\tif (play.equalsIgnoreCase(\"B3\"))\n\t\t\tB3 = player;\n\t\tif (play.equalsIgnoreCase(\"C1\"))\n\t\t\tC1 = player;\n\t\tif (play.equalsIgnoreCase(\"C2\"))\n\t\t\tC2 = player;\n\t\tif (play.equalsIgnoreCase(\"C3\"))\n\t\t\tC3 = player;\n\t}\n\n\tpublic static void displayBoard()\n\t{\n\t\tString line = \"\";\n\t\tSystem.out.println();\n\t\tline = \" \" + getXO(A1) + \" | \" + getXO(A2) + \" | \" + getXO(A3);\n\t\tSystem.out.println(line);\n\t\tSystem.out.println(\"-----------\");\n\t\tline = \" \" + getXO(B1) + \" | \" + getXO(B2) + \" | \" + getXO(B3);\n\t\tSystem.out.println(line);\n\t\tSystem.out.println(\"-----------\");\n\t\tline = \" \" + getXO(C1) + \" | \" + getXO(C2) + \" | \" + getXO(C3);\n\t\tSystem.out.println(line);\n\t\tSystem.out.println();\n\t}\n\n\tpublic static String getXO(int square)\n\t{\n\t\tif (square == 1)\n\t\t\treturn \"X\";\n\t\tif (square == 2)\n\t\t\treturn \"O\";\n\t\treturn \" \";\n\t}\n\n\tpublic static String getComputerMove()\n\t{\n\t\tif (A1 == 0)\n\t\t\treturn \"A1\";\n\t\tif (A2 == 0)\n\t\t\treturn \"A2\";\n\t\tif (A3 == 0)\n\t\t\treturn \"A3\";\n\t\tif (B1 == 0)\n\t\t\treturn \"B1\";\n\t\tif (B2 == 0)\n\t\t\treturn \"B2\";\n\t\tif (B3 == 0)\n\t\t\treturn \"B3\";\n\t\tif (C1 == 0)\n\t\t\treturn \"C1\";\n\t\tif (C2 == 0)\n\t\t\treturn \"C2\";\n\t\tif (C3 == 0)\n\t\t\treturn \"C3\";\n\t\treturn \"\";\n\t}\n\n\tpublic static boolean isGameWon()\n\t{\n\t\tif (isRowWon(A1, A2, A3))\n\t\t\treturn true;\n\t\tif (isRowWon(B1, B2, B3))\n\t\t\treturn true;\n\t\tif (isRowWon(C1, C2, C3))\n\t\t\treturn true;\n\t\tif (isRowWon(A1, B1, C1))\n\t\t\treturn true;\n\t\tif (isRowWon(A2, B2, C2))\n\t\t\treturn true;\n\t\tif (isRowWon(A3, B3, C3))\n\t\t\treturn true;\n\t\tif (isRowWon(A1, B2, C3))\n\t\t\treturn true;\n\t\tif (isRowWon(A3, B2, C1))\n\t\t\treturn true;\n\t\treturn false;\n\t}\n\n\tpublic static boolean isRowWon(int a, int b, int c)\n\t{\n\t\treturn ((a == b) & (a == c) & (a != 0));\n\t}\n}\n\n \n ```\n\n\n\n\n\n\n\n\n\n\n\n#### Outputs\n\n\n\n\n\n\n#### Curriculum\n\n- [First Tutorial](https://utopian.io/utopian-io/@drewie/making-form-applet-and-adding-checkboxs-on-java)\n- [Second Tutorial](https://utopian.io/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java)\n\n \n\n<br /><hr/><em>Posted on <a href=\"https://utopian.io/utopian-io/@drewie/tic-tac-toe-game-user-vs-computer-on-java\">Utopian.io - Rewarding Open Source Contributors</a></em><hr/>",
"json_metadata": "{\"community\":\"utopian\",\"app\":\"utopian/1.0.0\",\"format\":\"markdown\",\"repository\":{\"id\":5360933,\"name\":\"openjdk\",\"full_name\":\"dmlloyd/openjdk\",\"html_url\":\"https://github.com/dmlloyd/openjdk\",\"fork\":false,\"owner\":{\"login\":\"dmlloyd\"}},\"pullRequests\":[],\"platform\":\"github\",\"type\":\"tutorials\",\"tags\":[\"utopian-io\",\"utopian-io\",\"tutorial\",\"java\",\"eclipse\"],\"users\":[\"drewie\"],\"links\":[\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067430/hnl07w1kyhkh0sdzccwh.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067731/mup6poxzabmcaxzm3yqu.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068433/mp8hhx3pirl7qqssng0w.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068784/ay0l6otaa9ktm2pctbpv.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069063/njskjts7behabjn7winf.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069177/p9dngye2o2vcrrsnvpby.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069187/vj5qvigzy9h0qwpgejkp.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069194/exh7tpe6zlfzzbatavez.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069201/klf4yrsfhheiyvbbfsdu.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069276/bpab5og1qesejuzul3zi.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069333/ie14yhxyxav0gbz9mxuj.png\",\"https://utopian.io/utopian-io/@drewie/making-form-applet-and-adding-checkboxs-on-java\",\"https://utopian.io/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java\"],\"image\":[\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067430/hnl07w1kyhkh0sdzccwh.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067731/mup6poxzabmcaxzm3yqu.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068433/mp8hhx3pirl7qqssng0w.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068784/ay0l6otaa9ktm2pctbpv.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069063/njskjts7behabjn7winf.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069177/p9dngye2o2vcrrsnvpby.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069187/vj5qvigzy9h0qwpgejkp.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069194/exh7tpe6zlfzzbatavez.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069201/klf4yrsfhheiyvbbfsdu.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069276/bpab5og1qesejuzul3zi.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069333/ie14yhxyxav0gbz9mxuj.png\"],\"moderator\":{\"account\":\"amosbastian\",\"time\":\"2018-02-19T21:21:55.357Z\",\"flagged\":true,\"reviewed\":false,\"pending\":false},\"questions\":[],\"score\":0}"
}
]
}umichupvoted (10.00%) @drewie / tic-tac-toe-game-user-vs-computer-on-java2018/02/19 21:17:30
umichupvoted (10.00%) @drewie / tic-tac-toe-game-user-vs-computer-on-java
2018/02/19 21:17:30
| voter | umich |
| author | drewie |
| permlink | tic-tac-toe-game-user-vs-computer-on-java |
| weight | 1000 (10.00%) |
| Transaction Info | Block #20016794/Trx 1391cd87fb7e9d1650630a2b258d910b907fd6ef |
View Raw JSON Data
{
"trx_id": "1391cd87fb7e9d1650630a2b258d910b907fd6ef",
"block": 20016794,
"trx_in_block": 18,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-19T21:17:30",
"op": [
"vote",
{
"voter": "umich",
"author": "drewie",
"permlink": "tic-tac-toe-game-user-vs-computer-on-java",
"weight": 1000
}
]
}drewieclaimed reward balance: 0.008 SBD, 0.004 SP2018/02/19 21:08:45
drewieclaimed reward balance: 0.008 SBD, 0.004 SP
2018/02/19 21:08:45
| account | drewie |
| reward steem | 0.000 STEEM |
| reward sbd | 0.008 SBD |
| reward vests | 6.132390 VESTS |
| Transaction Info | Block #20016619/Trx 77474a0b2029c64faa8155307fc76fc41b925a3a |
View Raw JSON Data
{
"trx_id": "77474a0b2029c64faa8155307fc76fc41b925a3a",
"block": 20016619,
"trx_in_block": 15,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-19T21:08:45",
"op": [
"claim_reward_balance",
{
"account": "drewie",
"reward_steem": "0.000 STEEM",
"reward_sbd": "0.008 SBD",
"reward_vests": "6.132390 VESTS"
}
]
}drewieupdated options for tic-tac-toe-game-user-vs-computer-on-java2018/02/19 21:05:33
drewieupdated options for tic-tac-toe-game-user-vs-computer-on-java
2018/02/19 21:05:33
| author | drewie |
| permlink | tic-tac-toe-game-user-vs-computer-on-java |
| max accepted payout | 1000000.000 SBD |
| percent steem dollars | 10000 |
| allow votes | true |
| allow curation rewards | true |
| extensions | [[0,{"beneficiaries":[{"account":"utopian.pay","weight":2500}]}]] |
| Transaction Info | Block #20016555/Trx a0f2f6ccbb1fc7d69e8852c419d338479c0b33c1 |
View Raw JSON Data
{
"trx_id": "a0f2f6ccbb1fc7d69e8852c419d338479c0b33c1",
"block": 20016555,
"trx_in_block": 20,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-19T21:05:33",
"op": [
"comment_options",
{
"author": "drewie",
"permlink": "tic-tac-toe-game-user-vs-computer-on-java",
"max_accepted_payout": "1000000.000 SBD",
"percent_steem_dollars": 10000,
"allow_votes": true,
"allow_curation_rewards": true,
"extensions": [
[
0,
{
"beneficiaries": [
{
"account": "utopian.pay",
"weight": 2500
}
]
}
]
]
}
]
}drewiepublished a new post: tic-tac-toe-game-user-vs-computer-on-java2018/02/19 21:05:33
drewiepublished a new post: tic-tac-toe-game-user-vs-computer-on-java
2018/02/19 21:05:33
| parent author | |
| parent permlink | utopian-io |
| author | drewie |
| permlink | tic-tac-toe-game-user-vs-computer-on-java |
| title | Tic-Tac-Toe Game [ User Vs Computer ] On Java |
| body | #### What Will I Learn? - You will learn how to use variables,loops and arrays - You will learn how to make a tic tac toe game #### Requirements - Knowledge of coding on Java and Eclipse - Eclipse and Java must be setted up on the computer. #### Difficulty - Intermediate #### Tutorial Contents Hello,in this tutorial we are going to make a player vs computer tic-tac-toe game by using java on eclipse.First i defined my needed one line library then named my program.After i defined integer type variables in a,b,c which is my rows and a1,c3 etc. is my columns,then i defined a new static named "Scanner" to scan where user and computer is choosed to make their move. ``` import java.util.Scanner; public class TicTacToeGameByDrewie { static int A1, A2, A3, B1, B2, B3, C1, C2, C3; static Scanner sc = new Scanner(System.in); public static void main(String[] args) { ``` In the next step i defined my strings to welcome the user,and show user moves.In the below i used Boolean,this function is used to define True/false situation.GameisWon variable is false at that line because game has **not** started yet. ``` public static void main(String[] args) { String prompt = "Welcome to Tic-Tac-Toe Game. Please enter your first move: "; String humanMove = ""; String computerMove = ""; boolean gameIsWon = false; ``` Now we are going to use for and if loop together.We made i<=9 because in this game there can be maximum 9 moves.First we define human move."Prompt" is used to get input from the user so we are asking user to make the first movement. Updateboard is used after user made his/her move,we put in on the screen and then we display is with using "displayboard".We do same thing for the computer in the below and if the user won we use our "gameiswon" class to find out.We define it on user and computers code lines and use if loop to check who won with using "true".In the last line we check if it is draw and if noone won we print out to say "it is a draw". ``` for (int i = 1; i <=9; i++) { humanMove = getMove(prompt); updateBoard(humanMove, 1); displayBoard(); if (isGameWon()) { System.out.println("You beated me!"); gameIsWon = true; break; } if (i < 9) { computerMove = getComputerMove(); System.out.println("I will play at " + computerMove); updateBoard(computerMove, 2); displayBoard(); if (isGameWon()) { System.out.println("I beated you!"); gameIsWon = true; break; } prompt = "Please enter your next move: "; i++; } } if (!gameIsWon) System.out.println("It's a draw!"); } ```  Now game is beggining.First of all we create a class to get users move if user make a wrong input for example "a4" this is a wrong input,we will warn user.Then we create another class,if the input is valid we define all the rows and columns with using "equalsignorecase" this method is basically compares the strings that you have defined.We equal them all to zero so if the user or computer make a movement it will change. ``` public static String getMove(String prompt) { String play; System.out.print(prompt); do { play = sc.nextLine(); if (!isValidPlay(play)) { System.out.println("That is not a valid play."); } } while (!isValidPlay(play)); return play; } public static boolean isValidPlay(String play) { if (play.equalsIgnoreCase("A1") & A1 == 0) return true; if (play.equalsIgnoreCase("A2") & A2 == 0) return true; if (play.equalsIgnoreCase("A3") & A3 == 0) return true; if (play.equalsIgnoreCase("B1") & B1 == 0) return true; if (play.equalsIgnoreCase("B2") & B2 == 0) return true; if (play.equalsIgnoreCase("B3") & B3 == 0) return true; if (play.equalsIgnoreCase("C1") & C1 == 0) return true; if (play.equalsIgnoreCase("C2") & C2 == 0) return true; if (play.equalsIgnoreCase("C3") & C3 == 0) return true; return false; } ```  Now until here user and computer has made their move now we have to show it to user and update it.To do this we use "equalsignorecase" again.Basically we define users movement to the program with evaluating all the possibilities. ``` public static void updateBoard(String play, int player) { if (play.equalsIgnoreCase("A1")) A1 = player; if (play.equalsIgnoreCase("A2")) A2 = player; if (play.equalsIgnoreCase("A3")) A3 = player; if (play.equalsIgnoreCase("B1")) B1 = player; if (play.equalsIgnoreCase("B2")) B2 = player; if (play.equalsIgnoreCase("B3")) B3 = player; if (play.equalsIgnoreCase("C1")) C1 = player; if (play.equalsIgnoreCase("C2")) C2 = player; if (play.equalsIgnoreCase("C3")) C3 = player; } ``` In this step because of we haven't made an applet,we have to draw a tic-tac-toe game for the visuality.With using system.print.out as you know we asked user to make first move above after user choose where to move for example "a1" this lines will draw a X to a1. Then we must define to the program who is playing.To do that we create another class and as you know we defined "square".This is to find out whos turn is it.If it is users turn program will draw X if not it will draw "O". ``` public static void displayBoard() { String line = ""; System.out.println(); line = " " + getXO(A1) + " | " + getXO(A2) + " | " + getXO(A3); System.out.println(line); System.out.println("-----------"); line = " " + getXO(B1) + " | " + getXO(B2) + " | " + getXO(B3); System.out.println(line); System.out.println("-----------"); line = " " + getXO(C1) + " | " + getXO(C2) + " | " + getXO(C3); System.out.println(line); System.out.println(); } public static String getXO(int square) { if (square == 1) return "X"; if (square == 2) return "O"; return " "; } ```  In the final step we do same thing we did for the user.We define computers move to the program with creating a class and using if loop to evaluate the possibilities and define each line and column and equal to zero. Then we create another class to define the possibilites of winning.You can win with making 3 line cross,vertical or horizontal so we define all the possibilities and if user or computer made it through the 3 lines correctly we use "return true" which will show the message whoever won.It can be a draw so if any of cases didn't happen it will return false "draw" message. ``` public static String getComputerMove() { if (A1 == 0) return "A1"; if (A2 == 0) return "A2"; if (A3 == 0) return "A3"; if (B1 == 0) return "B1"; if (B2 == 0) return "B2"; if (B3 == 0) return "B3"; if (C1 == 0) return "C1"; if (C2 == 0) return "C2"; if (C3 == 0) return "C3"; return ""; } public static boolean isGameWon() { if (isRowWon(A1, A2, A3)) return true; if (isRowWon(B1, B2, B3)) return true; if (isRowWon(C1, C2, C3)) return true; if (isRowWon(A1, B1, C1)) return true; if (isRowWon(A2, B2, C2)) return true; if (isRowWon(A3, B3, C3)) return true; if (isRowWon(A1, B2, C3)) return true; if (isRowWon(A3, B2, C1)) return true; return false; } public static boolean isRowWon(int a, int b, int c) { return ((a == b) & (a == c) & (a != 0)); } } ```  #### Whole code with the screenshots and output ``` import java.util.Scanner; public class TicTacToeGameByDrewie { static int A1, A2, A3, B1, B2, B3, C1, C2, C3; static Scanner sc = new Scanner(System.in); public static void main(String[] args) { String prompt = "Welcome to Tic-Tac-Toe Game. Please enter your first move: "; String humanMove = ""; String computerMove = ""; boolean gameIsWon = false; for (int i = 1; i <=9; i++) { humanMove = getMove(prompt); updateBoard(humanMove, 1); displayBoard(); if (isGameWon()) { System.out.println("You beated me!"); gameIsWon = true; break; } if (i < 9) { computerMove = getComputerMove(); System.out.println("I will play at " + computerMove); updateBoard(computerMove, 2); displayBoard(); if (isGameWon()) { System.out.println("I beated you!"); gameIsWon = true; break; } prompt = "Please enter your next move: "; i++; } } if (!gameIsWon) System.out.println("It's a draw!"); } public static String getMove(String prompt) { String play; System.out.print(prompt); do { play = sc.nextLine(); if (!isValidPlay(play)) { System.out.println("That is not a valid play."); } } while (!isValidPlay(play)); return play; } public static boolean isValidPlay(String play) { if (play.equalsIgnoreCase("A1") & A1 == 0) return true; if (play.equalsIgnoreCase("A2") & A2 == 0) return true; if (play.equalsIgnoreCase("A3") & A3 == 0) return true; if (play.equalsIgnoreCase("B1") & B1 == 0) return true; if (play.equalsIgnoreCase("B2") & B2 == 0) return true; if (play.equalsIgnoreCase("B3") & B3 == 0) return true; if (play.equalsIgnoreCase("C1") & C1 == 0) return true; if (play.equalsIgnoreCase("C2") & C2 == 0) return true; if (play.equalsIgnoreCase("C3") & C3 == 0) return true; return false; } public static void updateBoard(String play, int player) { if (play.equalsIgnoreCase("A1")) A1 = player; if (play.equalsIgnoreCase("A2")) A2 = player; if (play.equalsIgnoreCase("A3")) A3 = player; if (play.equalsIgnoreCase("B1")) B1 = player; if (play.equalsIgnoreCase("B2")) B2 = player; if (play.equalsIgnoreCase("B3")) B3 = player; if (play.equalsIgnoreCase("C1")) C1 = player; if (play.equalsIgnoreCase("C2")) C2 = player; if (play.equalsIgnoreCase("C3")) C3 = player; } public static void displayBoard() { String line = ""; System.out.println(); line = " " + getXO(A1) + " | " + getXO(A2) + " | " + getXO(A3); System.out.println(line); System.out.println("-----------"); line = " " + getXO(B1) + " | " + getXO(B2) + " | " + getXO(B3); System.out.println(line); System.out.println("-----------"); line = " " + getXO(C1) + " | " + getXO(C2) + " | " + getXO(C3); System.out.println(line); System.out.println(); } public static String getXO(int square) { if (square == 1) return "X"; if (square == 2) return "O"; return " "; } public static String getComputerMove() { if (A1 == 0) return "A1"; if (A2 == 0) return "A2"; if (A3 == 0) return "A3"; if (B1 == 0) return "B1"; if (B2 == 0) return "B2"; if (B3 == 0) return "B3"; if (C1 == 0) return "C1"; if (C2 == 0) return "C2"; if (C3 == 0) return "C3"; return ""; } public static boolean isGameWon() { if (isRowWon(A1, A2, A3)) return true; if (isRowWon(B1, B2, B3)) return true; if (isRowWon(C1, C2, C3)) return true; if (isRowWon(A1, B1, C1)) return true; if (isRowWon(A2, B2, C2)) return true; if (isRowWon(A3, B3, C3)) return true; if (isRowWon(A1, B2, C3)) return true; if (isRowWon(A3, B2, C1)) return true; return false; } public static boolean isRowWon(int a, int b, int c) { return ((a == b) & (a == c) & (a != 0)); } } ```      #### Outputs   #### Curriculum - [First Tutorial](https://utopian.io/utopian-io/@drewie/making-form-applet-and-adding-checkboxs-on-java) - [Second Tutorial](https://utopian.io/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java) <br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@drewie/tic-tac-toe-game-user-vs-computer-on-java">Utopian.io - Rewarding Open Source Contributors</a></em><hr/> |
| json metadata | {"community":"utopian","app":"utopian/1.0.0","format":"markdown","repository":{"id":5360933,"name":"openjdk","full_name":"dmlloyd/openjdk","html_url":"https://github.com/dmlloyd/openjdk","fork":false,"owner":{"login":"dmlloyd"}},"pullRequests":[],"platform":"github","type":"tutorials","tags":["utopian-io","utopian-io","tutorial","java","eclipse"],"users":["drewie"],"links":["https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067430/hnl07w1kyhkh0sdzccwh.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067731/mup6poxzabmcaxzm3yqu.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068433/mp8hhx3pirl7qqssng0w.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068784/ay0l6otaa9ktm2pctbpv.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069063/njskjts7behabjn7winf.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069177/p9dngye2o2vcrrsnvpby.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069187/vj5qvigzy9h0qwpgejkp.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069194/exh7tpe6zlfzzbatavez.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069201/klf4yrsfhheiyvbbfsdu.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069276/bpab5og1qesejuzul3zi.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069333/ie14yhxyxav0gbz9mxuj.png","https://utopian.io/utopian-io/@drewie/making-form-applet-and-adding-checkboxs-on-java","https://utopian.io/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java"],"image":["https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067430/hnl07w1kyhkh0sdzccwh.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067731/mup6poxzabmcaxzm3yqu.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068433/mp8hhx3pirl7qqssng0w.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068784/ay0l6otaa9ktm2pctbpv.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069063/njskjts7behabjn7winf.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069177/p9dngye2o2vcrrsnvpby.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069187/vj5qvigzy9h0qwpgejkp.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069194/exh7tpe6zlfzzbatavez.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069201/klf4yrsfhheiyvbbfsdu.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069276/bpab5og1qesejuzul3zi.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069333/ie14yhxyxav0gbz9mxuj.png"]} |
| Transaction Info | Block #20016555/Trx a0f2f6ccbb1fc7d69e8852c419d338479c0b33c1 |
View Raw JSON Data
{
"trx_id": "a0f2f6ccbb1fc7d69e8852c419d338479c0b33c1",
"block": 20016555,
"trx_in_block": 20,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-19T21:05:33",
"op": [
"comment",
{
"parent_author": "",
"parent_permlink": "utopian-io",
"author": "drewie",
"permlink": "tic-tac-toe-game-user-vs-computer-on-java",
"title": "Tic-Tac-Toe Game [ User Vs Computer ] On Java",
"body": "\n#### What Will I Learn?\n\n- You will learn how to use variables,loops and arrays\n- You will learn how to make a tic tac toe game\n\n#### Requirements\n\n- Knowledge of coding on Java and Eclipse\n- Eclipse and Java must be setted up on the computer.\n\n#### Difficulty\n\n- Intermediate\n\n\n#### Tutorial Contents\n\nHello,in this tutorial we are going to make a player vs computer tic-tac-toe game by using java on eclipse.First i defined my needed one line library then named my program.After i defined integer type variables in a,b,c which is my rows and a1,c3 etc. is my columns,then i defined a new static named \"Scanner\" to scan where user and computer is choosed to make their move.\n\n```\nimport java.util.Scanner;\n\n\npublic class TicTacToeGameByDrewie\n{\n\nstatic int A1, A2, A3, B1, B2, B3, C1, C2, C3;\n\nstatic Scanner sc = new Scanner(System.in);\n\npublic static void main(String[] args)\n{\n ```\nIn the next step i defined my strings to welcome the user,and show user moves.In the below i used Boolean,this function is used to define True/false situation.GameisWon variable is false at that line because game has **not** started yet.\n\n```\npublic static void main(String[] args)\n{\nString prompt = \"Welcome to Tic-Tac-Toe Game. Please enter your first move: \";\nString humanMove = \"\";\nString computerMove = \"\";\nboolean gameIsWon = false; \n ```\n\nNow we are going to use for and if loop together.We made i<=9 because in this game there can be maximum 9 moves.First we define human move.\"Prompt\" is used to get input from the user so we are asking user to make the first movement.\n\nUpdateboard is used after user made his/her move,we put in on the screen and then we display is with using \"displayboard\".We do same thing for the computer in the below and if the user won we use our \"gameiswon\" class to find out.We define it on user and computers code lines and use if loop to check who won with using \"true\".In the last line we check if it is draw and if noone won we print out to say \"it is a draw\".\n\n```\nfor (int i = 1; i <=9; i++)\n{\nhumanMove = getMove(prompt);\nupdateBoard(humanMove, 1);\ndisplayBoard();\nif (isGameWon())\n{\nSystem.out.println(\"You beated me!\");\ngameIsWon = true;\nbreak;\n}\n\nif (i < 9)\n{\ncomputerMove = getComputerMove();\nSystem.out.println(\"I will play at \" + computerMove);\nupdateBoard(computerMove, 2);\ndisplayBoard();\nif (isGameWon())\n{\nSystem.out.println(\"I beated you!\");\ngameIsWon = true;\nbreak;\n}\nprompt = \"Please enter your next move: \";\ni++;\n}\n}\nif (!gameIsWon)\nSystem.out.println(\"It's a draw!\");\n}\n ```\n\n\nNow game is beggining.First of all we create a class to get users move if user make a wrong input for example \"a4\" this is a wrong input,we will warn user.Then we create another class,if the input is valid we define all the rows and columns with using \"equalsignorecase\" this method is basically compares the strings that you have defined.We equal them all to zero so if the user or computer make a movement it will change.\n\n```\npublic static String getMove(String prompt)\n\t{\n\t\tString play;\n\t\tSystem.out.print(prompt);\n\t\tdo\n\t\t{\n\t\t\tplay = sc.nextLine();\n\t\t\tif (!isValidPlay(play))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"That is not a valid play.\");\n\t\t\t}\n\t\t} while (!isValidPlay(play));\n\t\treturn play;\n\t}\n\n\tpublic static boolean isValidPlay(String play)\n\t{\n\t\tif (play.equalsIgnoreCase(\"A1\") & A1 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"A2\") & A2 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"A3\") & A3 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"B1\") & B1 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"B2\") & B2 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"B3\") & B3 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"C1\") & C1 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"C2\") & C2 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"C3\") & C3 == 0)\n\t\t\treturn true;\n\t\treturn false;\n\t}\n \n ```\n\n\n\nNow until here user and computer has made their move now we have to show it to user and update it.To do this we use \"equalsignorecase\" again.Basically we define users movement to the program with evaluating all the possibilities.\n\n```\npublic static void updateBoard(String play, int player)\n\t{\n\t\tif (play.equalsIgnoreCase(\"A1\"))\n\t\t\tA1 = player;\n\t\tif (play.equalsIgnoreCase(\"A2\"))\n\t\t\tA2 = player;\n\t\tif (play.equalsIgnoreCase(\"A3\"))\n\t\t\tA3 = player;\n\t\tif (play.equalsIgnoreCase(\"B1\"))\n\t\t\tB1 = player;\n\t\tif (play.equalsIgnoreCase(\"B2\"))\n\t\t\tB2 = player;\n\t\tif (play.equalsIgnoreCase(\"B3\"))\n\t\t\tB3 = player;\n\t\tif (play.equalsIgnoreCase(\"C1\"))\n\t\t\tC1 = player;\n\t\tif (play.equalsIgnoreCase(\"C2\"))\n\t\t\tC2 = player;\n\t\tif (play.equalsIgnoreCase(\"C3\"))\n\t\t\tC3 = player;\n\t}\n \n ```\n\nIn this step because of we haven't made an applet,we have to draw a tic-tac-toe game for the visuality.With using system.print.out as you know we asked user to make first move above after user choose where to move for example \"a1\" this lines will draw a X to a1.\n\nThen we must define to the program who is playing.To do that we create another class and as you know we defined \"square\".This is to find out whos turn is it.If it is users turn program will draw X if not it will draw \"O\".\n\n```\n public static void displayBoard()\n\t{\n\t\tString line = \"\";\n\t\tSystem.out.println();\n\t\tline = \" \" + getXO(A1) + \" | \" + getXO(A2) + \" | \" + getXO(A3);\n\t\tSystem.out.println(line);\n\t\tSystem.out.println(\"-----------\");\n\t\tline = \" \" + getXO(B1) + \" | \" + getXO(B2) + \" | \" + getXO(B3);\n\t\tSystem.out.println(line);\n\t\tSystem.out.println(\"-----------\");\n\t\tline = \" \" + getXO(C1) + \" | \" + getXO(C2) + \" | \" + getXO(C3);\n\t\tSystem.out.println(line);\n\t\tSystem.out.println();\n\t}\n\n\tpublic static String getXO(int square)\n\t{\n\t\tif (square == 1)\n\t\t\treturn \"X\";\n\t\tif (square == 2)\n\t\t\treturn \"O\";\n\t\treturn \" \";\n\t} \n ```\n\n\n\nIn the final step we do same thing we did for the user.We define computers move to the program with creating a class and using if loop to evaluate the possibilities and define each line and column and equal to zero.\n\nThen we create another class to define the possibilites of winning.You can win with making 3 line cross,vertical or horizontal so we define all the possibilities and if user or computer made it through the 3 lines correctly we use \"return true\" which will show the message whoever won.It can be a draw so if any of cases didn't happen it will return false \"draw\" message.\n\n```\npublic static String getComputerMove()\n\t{\n\t\tif (A1 == 0)\n\t\t\treturn \"A1\";\n\t\tif (A2 == 0)\n\t\t\treturn \"A2\";\n\t\tif (A3 == 0)\n\t\t\treturn \"A3\";\n\t\tif (B1 == 0)\n\t\t\treturn \"B1\";\n\t\tif (B2 == 0)\n\t\t\treturn \"B2\";\n\t\tif (B3 == 0)\n\t\t\treturn \"B3\";\n\t\tif (C1 == 0)\n\t\t\treturn \"C1\";\n\t\tif (C2 == 0)\n\t\t\treturn \"C2\";\n\t\tif (C3 == 0)\n\t\t\treturn \"C3\";\n\t\treturn \"\";\n\t}\n\n\tpublic static boolean isGameWon()\n\t{\n\t\tif (isRowWon(A1, A2, A3))\n\t\t\treturn true;\n\t\tif (isRowWon(B1, B2, B3))\n\t\t\treturn true;\n\t\tif (isRowWon(C1, C2, C3))\n\t\t\treturn true;\n\t\tif (isRowWon(A1, B1, C1))\n\t\t\treturn true;\n\t\tif (isRowWon(A2, B2, C2))\n\t\t\treturn true;\n\t\tif (isRowWon(A3, B3, C3))\n\t\t\treturn true;\n\t\tif (isRowWon(A1, B2, C3))\n\t\t\treturn true;\n\t\tif (isRowWon(A3, B2, C1))\n\t\t\treturn true;\n\t\treturn false;\n\t}\npublic static boolean isRowWon(int a, int b, int c)\n\t{\n\t\treturn ((a == b) & (a == c) & (a != 0));\n\t}\n}\n ```\n\n\n#### Whole code with the screenshots and output\n\n```\n import java.util.Scanner;\n\npublic class TicTacToeGameByDrewie\n{\n\n\tstatic int A1, A2, A3, B1, B2, B3, C1, C2, C3;\n\n\tstatic Scanner sc = new Scanner(System.in);\n\n\tpublic static void main(String[] args)\n\t{\n\t\tString prompt = \"Welcome to Tic-Tac-Toe Game. Please enter your first move: \";\n\t\tString humanMove = \"\";\n\t\tString computerMove = \"\";\n\t\tboolean gameIsWon = false;\n\n\n\t\tfor (int i = 1; i <=9; i++)\n\t\t{\n\n\t\t\thumanMove = getMove(prompt);\n\t\t\tupdateBoard(humanMove, 1);\n\t\t\tdisplayBoard();\n\t\t\tif (isGameWon())\n\t\t\t{\n\t\t\t\tSystem.out.println(\"You beated me!\");\n\t\t\t\tgameIsWon = true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (i < 9)\n\t\t\t{\n\t\t\t\tcomputerMove = getComputerMove();\n\t\t\t\tSystem.out.println(\"I will play at \" + computerMove);\n\t\t\t\tupdateBoard(computerMove, 2);\n\t\t\t\tdisplayBoard();\n\t\t\t\tif (isGameWon())\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"I beated you!\");\n\t\t\t\t\tgameIsWon = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tprompt = \"Please enter your next move: \";\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tif (!gameIsWon)\n\t\t\tSystem.out.println(\"It's a draw!\");\n\t}\n\n\tpublic static String getMove(String prompt)\n\t{\n\t\tString play;\n\t\tSystem.out.print(prompt);\n\t\tdo\n\t\t{\n\t\t\tplay = sc.nextLine();\n\t\t\tif (!isValidPlay(play))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"That is not a valid play.\");\n\t\t\t}\n\t\t} while (!isValidPlay(play));\n\t\treturn play;\n\t}\n\n\tpublic static boolean isValidPlay(String play)\n\t{\n\t\tif (play.equalsIgnoreCase(\"A1\") & A1 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"A2\") & A2 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"A3\") & A3 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"B1\") & B1 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"B2\") & B2 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"B3\") & B3 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"C1\") & C1 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"C2\") & C2 == 0)\n\t\t\treturn true;\n\t\tif (play.equalsIgnoreCase(\"C3\") & C3 == 0)\n\t\t\treturn true;\n\t\treturn false;\n\t}\n\n\tpublic static void updateBoard(String play, int player)\n\t{\n\t\tif (play.equalsIgnoreCase(\"A1\"))\n\t\t\tA1 = player;\n\t\tif (play.equalsIgnoreCase(\"A2\"))\n\t\t\tA2 = player;\n\t\tif (play.equalsIgnoreCase(\"A3\"))\n\t\t\tA3 = player;\n\t\tif (play.equalsIgnoreCase(\"B1\"))\n\t\t\tB1 = player;\n\t\tif (play.equalsIgnoreCase(\"B2\"))\n\t\t\tB2 = player;\n\t\tif (play.equalsIgnoreCase(\"B3\"))\n\t\t\tB3 = player;\n\t\tif (play.equalsIgnoreCase(\"C1\"))\n\t\t\tC1 = player;\n\t\tif (play.equalsIgnoreCase(\"C2\"))\n\t\t\tC2 = player;\n\t\tif (play.equalsIgnoreCase(\"C3\"))\n\t\t\tC3 = player;\n\t}\n\n\tpublic static void displayBoard()\n\t{\n\t\tString line = \"\";\n\t\tSystem.out.println();\n\t\tline = \" \" + getXO(A1) + \" | \" + getXO(A2) + \" | \" + getXO(A3);\n\t\tSystem.out.println(line);\n\t\tSystem.out.println(\"-----------\");\n\t\tline = \" \" + getXO(B1) + \" | \" + getXO(B2) + \" | \" + getXO(B3);\n\t\tSystem.out.println(line);\n\t\tSystem.out.println(\"-----------\");\n\t\tline = \" \" + getXO(C1) + \" | \" + getXO(C2) + \" | \" + getXO(C3);\n\t\tSystem.out.println(line);\n\t\tSystem.out.println();\n\t}\n\n\tpublic static String getXO(int square)\n\t{\n\t\tif (square == 1)\n\t\t\treturn \"X\";\n\t\tif (square == 2)\n\t\t\treturn \"O\";\n\t\treturn \" \";\n\t}\n\n\tpublic static String getComputerMove()\n\t{\n\t\tif (A1 == 0)\n\t\t\treturn \"A1\";\n\t\tif (A2 == 0)\n\t\t\treturn \"A2\";\n\t\tif (A3 == 0)\n\t\t\treturn \"A3\";\n\t\tif (B1 == 0)\n\t\t\treturn \"B1\";\n\t\tif (B2 == 0)\n\t\t\treturn \"B2\";\n\t\tif (B3 == 0)\n\t\t\treturn \"B3\";\n\t\tif (C1 == 0)\n\t\t\treturn \"C1\";\n\t\tif (C2 == 0)\n\t\t\treturn \"C2\";\n\t\tif (C3 == 0)\n\t\t\treturn \"C3\";\n\t\treturn \"\";\n\t}\n\n\tpublic static boolean isGameWon()\n\t{\n\t\tif (isRowWon(A1, A2, A3))\n\t\t\treturn true;\n\t\tif (isRowWon(B1, B2, B3))\n\t\t\treturn true;\n\t\tif (isRowWon(C1, C2, C3))\n\t\t\treturn true;\n\t\tif (isRowWon(A1, B1, C1))\n\t\t\treturn true;\n\t\tif (isRowWon(A2, B2, C2))\n\t\t\treturn true;\n\t\tif (isRowWon(A3, B3, C3))\n\t\t\treturn true;\n\t\tif (isRowWon(A1, B2, C3))\n\t\t\treturn true;\n\t\tif (isRowWon(A3, B2, C1))\n\t\t\treturn true;\n\t\treturn false;\n\t}\n\n\tpublic static boolean isRowWon(int a, int b, int c)\n\t{\n\t\treturn ((a == b) & (a == c) & (a != 0));\n\t}\n}\n\n \n ```\n\n\n\n\n\n\n\n\n\n\n\n#### Outputs\n\n\n\n\n\n\n#### Curriculum\n\n- [First Tutorial](https://utopian.io/utopian-io/@drewie/making-form-applet-and-adding-checkboxs-on-java)\n- [Second Tutorial](https://utopian.io/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java)\n\n \n\n<br /><hr/><em>Posted on <a href=\"https://utopian.io/utopian-io/@drewie/tic-tac-toe-game-user-vs-computer-on-java\">Utopian.io - Rewarding Open Source Contributors</a></em><hr/>",
"json_metadata": "{\"community\":\"utopian\",\"app\":\"utopian/1.0.0\",\"format\":\"markdown\",\"repository\":{\"id\":5360933,\"name\":\"openjdk\",\"full_name\":\"dmlloyd/openjdk\",\"html_url\":\"https://github.com/dmlloyd/openjdk\",\"fork\":false,\"owner\":{\"login\":\"dmlloyd\"}},\"pullRequests\":[],\"platform\":\"github\",\"type\":\"tutorials\",\"tags\":[\"utopian-io\",\"utopian-io\",\"tutorial\",\"java\",\"eclipse\"],\"users\":[\"drewie\"],\"links\":[\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067430/hnl07w1kyhkh0sdzccwh.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067731/mup6poxzabmcaxzm3yqu.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068433/mp8hhx3pirl7qqssng0w.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068784/ay0l6otaa9ktm2pctbpv.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069063/njskjts7behabjn7winf.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069177/p9dngye2o2vcrrsnvpby.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069187/vj5qvigzy9h0qwpgejkp.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069194/exh7tpe6zlfzzbatavez.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069201/klf4yrsfhheiyvbbfsdu.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069276/bpab5og1qesejuzul3zi.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069333/ie14yhxyxav0gbz9mxuj.png\",\"https://utopian.io/utopian-io/@drewie/making-form-applet-and-adding-checkboxs-on-java\",\"https://utopian.io/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java\"],\"image\":[\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067430/hnl07w1kyhkh0sdzccwh.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519067731/mup6poxzabmcaxzm3yqu.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068433/mp8hhx3pirl7qqssng0w.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519068784/ay0l6otaa9ktm2pctbpv.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069063/njskjts7behabjn7winf.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069177/p9dngye2o2vcrrsnvpby.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069187/vj5qvigzy9h0qwpgejkp.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069194/exh7tpe6zlfzzbatavez.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069201/klf4yrsfhheiyvbbfsdu.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069276/bpab5og1qesejuzul3zi.png\",\"https://res.cloudinary.com/hpiynhbhq/image/upload/v1519069333/ie14yhxyxav0gbz9mxuj.png\"]}"
}
]
}drewiereceived 0.008 SBD, 0.004 SP author reward for @drewie / adding-turkish-language-option-on-steemit2018/02/19 00:07:45
drewiereceived 0.008 SBD, 0.004 SP author reward for @drewie / adding-turkish-language-option-on-steemit
2018/02/19 00:07:45
| author | drewie |
| permlink | adding-turkish-language-option-on-steemit |
| sbd payout | 0.008 SBD |
| steem payout | 0.000 STEEM |
| vesting payout | 6.132390 VESTS |
| Transaction Info | Block #19991417/Virtual Operation #11 |
View Raw JSON Data
{
"trx_id": "0000000000000000000000000000000000000000",
"block": 19991417,
"trx_in_block": 4294967295,
"op_in_trx": 0,
"virtual_op": 11,
"timestamp": "2018-02-19T00:07:45",
"op": [
"author_reward",
{
"author": "drewie",
"permlink": "adding-turkish-language-option-on-steemit",
"sbd_payout": "0.008 SBD",
"steem_payout": "0.000 STEEM",
"vesting_payout": "6.132390 VESTS"
}
]
}utopian.payreceived 0.001 SP benefactor reward from @drewie2018/02/19 00:07:45
utopian.payreceived 0.001 SP benefactor reward from @drewie
2018/02/19 00:07:45
| benefactor | utopian.pay |
| author | drewie |
| permlink | adding-turkish-language-option-on-steemit |
| sbd payout | 0.000 SBD |
| steem payout | 0.000 STEEM |
| vesting payout | 2.044130 VESTS |
| Transaction Info | Block #19991417/Virtual Operation #10 |
View Raw JSON Data
{
"trx_id": "0000000000000000000000000000000000000000",
"block": 19991417,
"trx_in_block": 4294967295,
"op_in_trx": 0,
"virtual_op": 10,
"timestamp": "2018-02-19T00:07:45",
"op": [
"comment_benefactor_reward",
{
"benefactor": "utopian.pay",
"author": "drewie",
"permlink": "adding-turkish-language-option-on-steemit",
"sbd_payout": "0.000 SBD",
"steem_payout": "0.000 STEEM",
"vesting_payout": "2.044130 VESTS"
}
]
}2018/02/18 21:28:21
2018/02/18 21:28:21
| parent author | drewie |
| parent permlink | introducing-kstars |
| author | redart |
| permlink | re-drewie-introducing-kstars-20180218t212819690z |
| title | |
| body | Your contribution cannot be approved because it is a duplicate. It is very similar to a contribution that was already accepted [here_1](https://utopian.io/utopian-io/@arie.steem/kstars-review-and-basic-tutorial) [here_2](https://utopian.io/utopian-io/@arie.steem/kstars-set-time-and-set-solar-system-time). You can contact us on [Discord](https://discord.gg/uTyJkNm). **[[utopian-moderator]](https://utopian.io/moderators)** |
| json metadata | {"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"} |
| Transaction Info | Block #19988230/Trx c2f043abd2cde88e9ad332559d81f81510c12a90 |
View Raw JSON Data
{
"trx_id": "c2f043abd2cde88e9ad332559d81f81510c12a90",
"block": 19988230,
"trx_in_block": 32,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-18T21:28:21",
"op": [
"comment",
{
"parent_author": "drewie",
"parent_permlink": "introducing-kstars",
"author": "redart",
"permlink": "re-drewie-introducing-kstars-20180218t212819690z",
"title": "",
"body": "Your contribution cannot be approved because it is a duplicate. It is very similar to a contribution that was already accepted [here_1](https://utopian.io/utopian-io/@arie.steem/kstars-review-and-basic-tutorial) [here_2](https://utopian.io/utopian-io/@arie.steem/kstars-set-time-and-set-solar-system-time).\n\nYou can contact us on [Discord](https://discord.gg/uTyJkNm).\n**[[utopian-moderator]](https://utopian.io/moderators)**",
"json_metadata": "{\"tags\":[\"utopian-io\"],\"community\":\"utopian\",\"app\":\"utopian/1.0.0\"}"
}
]
}drewiepublished a new post: introducing-kstars2018/02/18 21:27:12
drewiepublished a new post: introducing-kstars
2018/02/18 21:27:12
| parent author | |
| parent permlink | utopian-io |
| author | drewie |
| permlink | introducing-kstars |
| title | Introducing Kstars |
| body | #### What Will I Learn? Hello,in this tutorial - You will learn how to use Kstars - You will learn usage of menu buttons - You will learn how to calculate different time zones. - You will learn how to select different location from the map. #### Requirements - Kstars must be setup. [Kstars website](https://edu.kde.org/kstars/install.php) - Windows,Linux,Macintosh OS. #### Difficulty - Basic #### Description Hello,in this tutorial i will show you how to use Kstars,first i show you how to use the main menu panel then i showed you how to calculate different time zones and how to select location. Finally you will learn how to appear/dissapear constellations from menu.If you are interested in astronomy keep following me for more tutorials... #### Video Tutorial https://www.youtube.com/watch?v=knopwXyw5Go&feature=youtu.be <br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@drewie/introducing-kstars">Utopian.io - Rewarding Open Source Contributors</a></em><hr/> |
| json metadata | {"community":"utopian","app":"utopian/1.0.0","format":"markdown","repository":{"id":42718970,"name":"kstars","full_name":"KDE/kstars","html_url":"https://github.com/KDE/kstars","fork":false,"owner":{"login":"KDE"}},"pullRequests":[],"platform":"github","type":"video-tutorials","tags":["utopian-io","utopian-io","kstars","videotutorial","astronomy"],"links":["https://edu.kde.org/kstars/install.php"],"moderator":{"account":"redart","time":"2018-02-18T21:27:11.325Z","flagged":true,"reviewed":false,"pending":false},"questions":[],"score":0} |
| Transaction Info | Block #19988207/Trx ee70e9b03822a525958eda3a11d7a670ff40b643 |
View Raw JSON Data
{
"trx_id": "ee70e9b03822a525958eda3a11d7a670ff40b643",
"block": 19988207,
"trx_in_block": 4,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-18T21:27:12",
"op": [
"comment",
{
"parent_author": "",
"parent_permlink": "utopian-io",
"author": "drewie",
"permlink": "introducing-kstars",
"title": "Introducing Kstars",
"body": "\n#### What Will I Learn?\n\nHello,in this tutorial\n\n- You will learn how to use Kstars\n- You will learn usage of menu buttons\n- You will learn how to calculate different time zones.\n- You will learn how to select different location from the map.\n\n#### Requirements\n\n- Kstars must be setup.\n[Kstars website](https://edu.kde.org/kstars/install.php)\n\n- Windows,Linux,Macintosh OS.\n\n\n#### Difficulty\n\n- Basic\n\n#### Description\n\nHello,in this tutorial i will show you how to use Kstars,first i show you how to use the main menu panel then i showed you how to calculate different time zones and how to select location.\n\n Finally you will learn how to appear/dissapear constellations from menu.If you are interested in astronomy keep following me for more tutorials...\n\n#### Video Tutorial\n\nhttps://www.youtube.com/watch?v=knopwXyw5Go&feature=youtu.be\n\n\n\n<br /><hr/><em>Posted on <a href=\"https://utopian.io/utopian-io/@drewie/introducing-kstars\">Utopian.io - Rewarding Open Source Contributors</a></em><hr/>",
"json_metadata": "{\"community\":\"utopian\",\"app\":\"utopian/1.0.0\",\"format\":\"markdown\",\"repository\":{\"id\":42718970,\"name\":\"kstars\",\"full_name\":\"KDE/kstars\",\"html_url\":\"https://github.com/KDE/kstars\",\"fork\":false,\"owner\":{\"login\":\"KDE\"}},\"pullRequests\":[],\"platform\":\"github\",\"type\":\"video-tutorials\",\"tags\":[\"utopian-io\",\"utopian-io\",\"kstars\",\"videotutorial\",\"astronomy\"],\"links\":[\"https://edu.kde.org/kstars/install.php\"],\"moderator\":{\"account\":\"redart\",\"time\":\"2018-02-18T21:27:11.325Z\",\"flagged\":true,\"reviewed\":false,\"pending\":false},\"questions\":[],\"score\":0}"
}
]
}2018/02/18 20:35:48
2018/02/18 20:35:48
| from | drewie |
| to | null |
| amount | 0.191 SBD |
| memo | @drewie/introducing-kstars |
| Transaction Info | Block #19987179/Trx 7b76b13d33ac04dae6473aa48d98098e421b690c |
View Raw JSON Data
{
"trx_id": "7b76b13d33ac04dae6473aa48d98098e421b690c",
"block": 19987179,
"trx_in_block": 18,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-18T20:35:48",
"op": [
"transfer",
{
"from": "drewie",
"to": "null",
"amount": "0.191 SBD",
"memo": "@drewie/introducing-kstars"
}
]
}drewieupvoted (100.00%) @drewie / introducing-kstars2018/02/18 20:35:27
drewieupvoted (100.00%) @drewie / introducing-kstars
2018/02/18 20:35:27
| voter | drewie |
| author | drewie |
| permlink | introducing-kstars |
| weight | 10000 (100.00%) |
| Transaction Info | Block #19987172/Trx 68ca1df7e53c63f1a264a567b6bf9fea53c9fbc0 |
View Raw JSON Data
{
"trx_id": "68ca1df7e53c63f1a264a567b6bf9fea53c9fbc0",
"block": 19987172,
"trx_in_block": 45,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-18T20:35:27",
"op": [
"vote",
{
"voter": "drewie",
"author": "drewie",
"permlink": "introducing-kstars",
"weight": 10000
}
]
}drewieupdated options for introducing-kstars2018/02/18 20:33:24
drewieupdated options for introducing-kstars
2018/02/18 20:33:24
| author | drewie |
| permlink | introducing-kstars |
| max accepted payout | 1000000.000 SBD |
| percent steem dollars | 10000 |
| allow votes | true |
| allow curation rewards | true |
| extensions | [[0,{"beneficiaries":[{"account":"utopian.pay","weight":2500}]}]] |
| Transaction Info | Block #19987131/Trx 6aed0d0a1f34c9905db8a19138d8e4ee6b7064af |
View Raw JSON Data
{
"trx_id": "6aed0d0a1f34c9905db8a19138d8e4ee6b7064af",
"block": 19987131,
"trx_in_block": 36,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-18T20:33:24",
"op": [
"comment_options",
{
"author": "drewie",
"permlink": "introducing-kstars",
"max_accepted_payout": "1000000.000 SBD",
"percent_steem_dollars": 10000,
"allow_votes": true,
"allow_curation_rewards": true,
"extensions": [
[
0,
{
"beneficiaries": [
{
"account": "utopian.pay",
"weight": 2500
}
]
}
]
]
}
]
}drewiepublished a new post: introducing-kstars2018/02/18 20:33:24
drewiepublished a new post: introducing-kstars
2018/02/18 20:33:24
| parent author | |
| parent permlink | utopian-io |
| author | drewie |
| permlink | introducing-kstars |
| title | Introducing Kstars |
| body | #### What Will I Learn? Hello,in this tutorial - You will learn how to use Kstars - You will learn usage of menu buttons - You will learn how to calculate different time zones. - You will learn how to select different location from the map. #### Requirements - Kstars must be setup. [Kstars website](https://edu.kde.org/kstars/install.php) - Windows,Linux,Macintosh OS. #### Difficulty - Basic #### Description Hello,in this tutorial i will show you how to use Kstars,first i show you how to use the main menu panel then i showed you how to calculate different time zones and how to select location. Finally you will learn how to appear/dissapear constellations from menu.If you are interested in astronomy keep following me for more tutorials... #### Video Tutorial https://www.youtube.com/watch?v=knopwXyw5Go&feature=youtu.be <br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@drewie/introducing-kstars">Utopian.io - Rewarding Open Source Contributors</a></em><hr/> |
| json metadata | {"community":"utopian","app":"utopian/1.0.0","format":"markdown","repository":{"id":42718970,"name":"kstars","full_name":"KDE/kstars","html_url":"https://github.com/KDE/kstars","fork":false,"owner":{"login":"KDE"}},"pullRequests":[],"platform":"github","type":"video-tutorials","tags":["utopian-io","utopian-io","kstars","videotutorial","astronomy"],"links":["https://edu.kde.org/kstars/install.php"]} |
| Transaction Info | Block #19987131/Trx 6aed0d0a1f34c9905db8a19138d8e4ee6b7064af |
View Raw JSON Data
{
"trx_id": "6aed0d0a1f34c9905db8a19138d8e4ee6b7064af",
"block": 19987131,
"trx_in_block": 36,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-18T20:33:24",
"op": [
"comment",
{
"parent_author": "",
"parent_permlink": "utopian-io",
"author": "drewie",
"permlink": "introducing-kstars",
"title": "Introducing Kstars",
"body": "\n#### What Will I Learn?\n\nHello,in this tutorial\n\n- You will learn how to use Kstars\n- You will learn usage of menu buttons\n- You will learn how to calculate different time zones.\n- You will learn how to select different location from the map.\n\n#### Requirements\n\n- Kstars must be setup.\n[Kstars website](https://edu.kde.org/kstars/install.php)\n\n- Windows,Linux,Macintosh OS.\n\n\n#### Difficulty\n\n- Basic\n\n#### Description\n\nHello,in this tutorial i will show you how to use Kstars,first i show you how to use the main menu panel then i showed you how to calculate different time zones and how to select location.\n\n Finally you will learn how to appear/dissapear constellations from menu.If you are interested in astronomy keep following me for more tutorials...\n\n#### Video Tutorial\n\nhttps://www.youtube.com/watch?v=knopwXyw5Go&feature=youtu.be\n\n\n\n<br /><hr/><em>Posted on <a href=\"https://utopian.io/utopian-io/@drewie/introducing-kstars\">Utopian.io - Rewarding Open Source Contributors</a></em><hr/>",
"json_metadata": "{\"community\":\"utopian\",\"app\":\"utopian/1.0.0\",\"format\":\"markdown\",\"repository\":{\"id\":42718970,\"name\":\"kstars\",\"full_name\":\"KDE/kstars\",\"html_url\":\"https://github.com/KDE/kstars\",\"fork\":false,\"owner\":{\"login\":\"KDE\"}},\"pullRequests\":[],\"platform\":\"github\",\"type\":\"video-tutorials\",\"tags\":[\"utopian-io\",\"utopian-io\",\"kstars\",\"videotutorial\",\"astronomy\"],\"links\":[\"https://edu.kde.org/kstars/install.php\"]}"
}
]
}2018/02/18 16:06:36
2018/02/18 16:06:36
| parent author | drewie |
| parent permlink | making-a-steembackeddollar-currency-converter-on-java |
| author | utopian-io |
| permlink | re-drewie-making-a-steembackeddollar-currency-converter-on-java-20180218t160636600z |
| title | |
| body | ### Hey @drewie I am @utopian-io. I have just upvoted you! #### Achievements - You have less than 500 followers. Just gave you a gift to help you succeed! - Seems like you contribute quite often. AMAZING! #### Suggestions - Contribute more often to get higher and higher rewards. I wish to see you often! - Work on your followers to increase the votes/rewards. I follow what humans do and my vote is mainly based on that. Good luck! #### Get Noticed! - Did you know project owners can manually vote with their own voting power or by voting power delegated to their projects? Ask the project owner to review your contributions! #### Community-Driven Witness! I am the first and only Steem Community-Driven Witness. <a href="https://discord.gg/zTrEMqB">Participate on Discord</a>. Lets GROW TOGETHER! - <a href="https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1">Vote for my Witness With SteemConnect</a> - <a href="https://v2.steemconnect.com/sign/account-witness-proxy?proxy=utopian-io&approve=1">Proxy vote to Utopian Witness with SteemConnect</a> - Or vote/proxy on <a href="https://steemit.com/~witnesses">Steemit Witnesses</a> [](https://steemit.com/~witnesses) **Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x** |
| json metadata | {"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"} |
| Transaction Info | Block #19981796/Trx b89f557677682274f9b458d833254ba053e5ab19 |
View Raw JSON Data
{
"trx_id": "b89f557677682274f9b458d833254ba053e5ab19",
"block": 19981796,
"trx_in_block": 44,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-18T16:06:36",
"op": [
"comment",
{
"parent_author": "drewie",
"parent_permlink": "making-a-steembackeddollar-currency-converter-on-java",
"author": "utopian-io",
"permlink": "re-drewie-making-a-steembackeddollar-currency-converter-on-java-20180218t160636600z",
"title": "",
"body": "### Hey @drewie I am @utopian-io. I have just upvoted you!\n#### Achievements\n- You have less than 500 followers. Just gave you a gift to help you succeed!\n- Seems like you contribute quite often. AMAZING!\n#### Suggestions\n- Contribute more often to get higher and higher rewards. I wish to see you often!\n- Work on your followers to increase the votes/rewards. I follow what humans do and my vote is mainly based on that. Good luck!\n#### Get Noticed!\n- Did you know project owners can manually vote with their own voting power or by voting power delegated to their projects? Ask the project owner to review your contributions!\n#### Community-Driven Witness!\nI am the first and only Steem Community-Driven Witness. <a href=\"https://discord.gg/zTrEMqB\">Participate on Discord</a>. Lets GROW TOGETHER!\n- <a href=\"https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1\">Vote for my Witness With SteemConnect</a>\n- <a href=\"https://v2.steemconnect.com/sign/account-witness-proxy?proxy=utopian-io&approve=1\">Proxy vote to Utopian Witness with SteemConnect</a>\n- Or vote/proxy on <a href=\"https://steemit.com/~witnesses\">Steemit Witnesses</a>\n\n[](https://steemit.com/~witnesses)\n\n**Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x**",
"json_metadata": "{\"tags\":[\"utopian-io\"],\"community\":\"utopian\",\"app\":\"utopian/1.0.0\"}"
}
]
}utopian-ioupvoted (1.81%) @drewie / making-a-steembackeddollar-currency-converter-on-java2018/02/18 16:06:33
utopian-ioupvoted (1.81%) @drewie / making-a-steembackeddollar-currency-converter-on-java
2018/02/18 16:06:33
| voter | utopian-io |
| author | drewie |
| permlink | making-a-steembackeddollar-currency-converter-on-java |
| weight | 181 (1.81%) |
| Transaction Info | Block #19981795/Trx 95d70e10214620ea73d010fceda05d74694ba9f4 |
View Raw JSON Data
{
"trx_id": "95d70e10214620ea73d010fceda05d74694ba9f4",
"block": 19981795,
"trx_in_block": 51,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-18T16:06:33",
"op": [
"vote",
{
"voter": "utopian-io",
"author": "drewie",
"permlink": "making-a-steembackeddollar-currency-converter-on-java",
"weight": 181
}
]
}wodsuzupvoted (100.00%) @drewie / making-a-steembackeddollar-currency-converter-on-java2018/02/17 22:44:24
wodsuzupvoted (100.00%) @drewie / making-a-steembackeddollar-currency-converter-on-java
2018/02/17 22:44:24
| voter | wodsuz |
| author | drewie |
| permlink | making-a-steembackeddollar-currency-converter-on-java |
| weight | 10000 (100.00%) |
| Transaction Info | Block #19960953/Trx c44cb12bd821eedf3d9291c2aebce8f757824fdb |
View Raw JSON Data
{
"trx_id": "c44cb12bd821eedf3d9291c2aebce8f757824fdb",
"block": 19960953,
"trx_in_block": 37,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-17T22:44:24",
"op": [
"vote",
{
"voter": "wodsuz",
"author": "drewie",
"permlink": "making-a-steembackeddollar-currency-converter-on-java",
"weight": 10000
}
]
}drewieupvoted (100.00%) @melaffection / when-ever-i-get-in-the-car-zg1hbmlh-xn9st2018/02/17 22:25:33
drewieupvoted (100.00%) @melaffection / when-ever-i-get-in-the-car-zg1hbmlh-xn9st
2018/02/17 22:25:33
| voter | drewie |
| author | melaffection |
| permlink | when-ever-i-get-in-the-car-zg1hbmlh-xn9st |
| weight | 10000 (100.00%) |
| Transaction Info | Block #19960576/Trx c3131572e73b586390d5a372ea0498b82bcaab9d |
View Raw JSON Data
{
"trx_id": "c3131572e73b586390d5a372ea0498b82bcaab9d",
"block": 19960576,
"trx_in_block": 44,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-17T22:25:33",
"op": [
"vote",
{
"voter": "drewie",
"author": "melaffection",
"permlink": "when-ever-i-get-in-the-car-zg1hbmlh-xn9st",
"weight": 10000
}
]
}drewieupvoted (100.00%) @melaffection / doggo-vs-snow-zg1hbmlh-n6rq32018/02/17 22:23:45
drewieupvoted (100.00%) @melaffection / doggo-vs-snow-zg1hbmlh-n6rq3
2018/02/17 22:23:45
| voter | drewie |
| author | melaffection |
| permlink | doggo-vs-snow-zg1hbmlh-n6rq3 |
| weight | 10000 (100.00%) |
| Transaction Info | Block #19960540/Trx 34f9aea92dc9d809fc395692af67f211ed0e19c9 |
View Raw JSON Data
{
"trx_id": "34f9aea92dc9d809fc395692af67f211ed0e19c9",
"block": 19960540,
"trx_in_block": 8,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-17T22:23:45",
"op": [
"vote",
{
"voter": "drewie",
"author": "melaffection",
"permlink": "doggo-vs-snow-zg1hbmlh-n6rq3",
"weight": 10000
}
]
}2018/02/17 19:16:39
2018/02/17 19:16:39
| from | booster |
| to | drewie |
| amount | 0.001 SBD |
| memo | Unable to accept bid. (ID:90b7e1d451cef223d9e24a05b862a1a95584465e) |
| Transaction Info | Block #19956799/Trx 973317017fe057d25bb615e223bc462e509c8289 |
View Raw JSON Data
{
"trx_id": "973317017fe057d25bb615e223bc462e509c8289",
"block": 19956799,
"trx_in_block": 39,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-17T19:16:39",
"op": [
"transfer",
{
"from": "booster",
"to": "drewie",
"amount": "0.001 SBD",
"memo": "Unable to accept bid. (ID:90b7e1d451cef223d9e24a05b862a1a95584465e)"
}
]
}kamilala125upvoted (32.00%) @drewie / making-a-steembackeddollar-currency-converter-on-java2018/02/17 18:47:03
kamilala125upvoted (32.00%) @drewie / making-a-steembackeddollar-currency-converter-on-java
2018/02/17 18:47:03
| voter | kamilala125 |
| author | drewie |
| permlink | making-a-steembackeddollar-currency-converter-on-java |
| weight | 3200 (32.00%) |
| Transaction Info | Block #19956207/Trx c0d10dcfde126a8b8465b4420497c8cc9f051eba |
View Raw JSON Data
{
"trx_id": "c0d10dcfde126a8b8465b4420497c8cc9f051eba",
"block": 19956207,
"trx_in_block": 28,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-17T18:47:03",
"op": [
"vote",
{
"voter": "kamilala125",
"author": "drewie",
"permlink": "making-a-steembackeddollar-currency-converter-on-java",
"weight": 3200
}
]
}2018/02/17 15:02:21
2018/02/17 15:02:21
| parent author | drewie |
| parent permlink | making-a-steembackeddollar-currency-converter-on-java |
| author | moneymatchgaming |
| permlink | re-drewie-making-a-steembackeddollar-currency-converter-on-java-20180217t150155897z |
| title | |
| body | <p>This post has received a 5.33 % upvote from @moneymatchgaming thanks to: @drewie. Upvote this Post to Support the MMG Community on Steemit! :)</p> |
| json metadata | {"tags":["utopian-io"],"app":"drotto/0.0.2d"} |
| Transaction Info | Block #19951713/Trx 11d90099bcdc9f7c8907fe2c0bb49c239eeb6c70 |
View Raw JSON Data
{
"trx_id": "11d90099bcdc9f7c8907fe2c0bb49c239eeb6c70",
"block": 19951713,
"trx_in_block": 11,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-17T15:02:21",
"op": [
"comment",
{
"parent_author": "drewie",
"parent_permlink": "making-a-steembackeddollar-currency-converter-on-java",
"author": "moneymatchgaming",
"permlink": "re-drewie-making-a-steembackeddollar-currency-converter-on-java-20180217t150155897z",
"title": "",
"body": "<p>This post has received a 5.33 % upvote from @moneymatchgaming thanks to: @drewie. Upvote this Post to Support the MMG Community on Steemit! :)</p>\n",
"json_metadata": "{\"tags\":[\"utopian-io\"],\"app\":\"drotto/0.0.2d\"}"
}
]
}moneymatchgamingupvoted (5.33%) @drewie / making-a-steembackeddollar-currency-converter-on-java2018/02/17 15:02:21
moneymatchgamingupvoted (5.33%) @drewie / making-a-steembackeddollar-currency-converter-on-java
2018/02/17 15:02:21
| voter | moneymatchgaming |
| author | drewie |
| permlink | making-a-steembackeddollar-currency-converter-on-java |
| weight | 533 (5.33%) |
| Transaction Info | Block #19951713/Trx 11d90099bcdc9f7c8907fe2c0bb49c239eeb6c70 |
View Raw JSON Data
{
"trx_id": "11d90099bcdc9f7c8907fe2c0bb49c239eeb6c70",
"block": 19951713,
"trx_in_block": 11,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-17T15:02:21",
"op": [
"vote",
{
"voter": "moneymatchgaming",
"author": "drewie",
"permlink": "making-a-steembackeddollar-currency-converter-on-java",
"weight": 533
}
]
}2018/02/17 15:02:15
2018/02/17 15:02:15
| parent author | drewie |
| parent permlink | making-a-steembackeddollar-currency-converter-on-java |
| author | therising |
| permlink | re-making-a-steembackeddollar-currency-converter-on-java-20180217t150216 |
| title | |
| body | You just rose by 9.8039% upvote from @therising courtesy of @drewie. Earn 43.8% APR & rise further by delegating SP to therising. For more details visit: https://steemit.com/budget/@therising/auto-daily-payout-of-43-8-apr-for-steem-power-delegations-starting-from-500-sp-only-limited-period-offer. |
| json metadata | |
| Transaction Info | Block #19951711/Trx be21f40e1b8048c7ba4e6461b9640457cac90dd9 |
View Raw JSON Data
{
"trx_id": "be21f40e1b8048c7ba4e6461b9640457cac90dd9",
"block": 19951711,
"trx_in_block": 42,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-17T15:02:15",
"op": [
"comment",
{
"parent_author": "drewie",
"parent_permlink": "making-a-steembackeddollar-currency-converter-on-java",
"author": "therising",
"permlink": "re-making-a-steembackeddollar-currency-converter-on-java-20180217t150216",
"title": "",
"body": "You just rose by 9.8039% upvote from @therising courtesy of @drewie. Earn 43.8% APR & rise further by delegating SP to therising. For more details visit: https://steemit.com/budget/@therising/auto-daily-payout-of-43-8-apr-for-steem-power-delegations-starting-from-500-sp-only-limited-period-offer.",
"json_metadata": ""
}
]
}therisingupvoted (9.80%) @drewie / making-a-steembackeddollar-currency-converter-on-java2018/02/17 15:00:42
therisingupvoted (9.80%) @drewie / making-a-steembackeddollar-currency-converter-on-java
2018/02/17 15:00:42
| voter | therising |
| author | drewie |
| permlink | making-a-steembackeddollar-currency-converter-on-java |
| weight | 980 (9.80%) |
| Transaction Info | Block #19951680/Trx 46d4974a682faa00efdd6968b1e1b1c8e36c79b0 |
View Raw JSON Data
{
"trx_id": "46d4974a682faa00efdd6968b1e1b1c8e36c79b0",
"block": 19951680,
"trx_in_block": 28,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-17T15:00:42",
"op": [
"vote",
{
"voter": "therising",
"author": "drewie",
"permlink": "making-a-steembackeddollar-currency-converter-on-java",
"weight": 980
}
]
}2018/02/17 14:48:09
2018/02/17 14:48:09
| parent author | drewie |
| parent permlink | making-a-steembackeddollar-currency-converter-on-java |
| author | whalebuilder |
| permlink | re-drewie-making-a-steembackeddollar-currency-converter-on-java-20180217t144803619z |
| title | re-drewie-making-a-steembackeddollar-currency-converter-on-java-20180217t144803619z |
| body | You got a 4.36% upvote from @whalebuilder courtesy of @drewie. Join @whalebuilder family at our [Discord Channel](https://discord.gg/heYnjCf). Don't let your precious stake(SP) go stale...Make it do more so you have to do less. Deligate it to @whalebuilder by clicking on one of the ready to delegate links: [50SP](https://steemconnect.com/sign/delegateVestingShares?delegator=&delegatee=whalebuilder&vesting_shares=50%20SP) | [100SP](https://v2.steemconnect.com/sign/delegateVestingShares?delegator=&delegatee=whalebuilder&vesting_shares=100%20SP) | [250SP](https://v2.steemconnect.com/sign/delegateVestingShares?delegator=&delegatee=whalebuilder&vesting_shares=250%20SP) | [500SP](https://v2.steemconnect.com/sign/delegateVestingShares?delegator=&delegatee=whalebuilder&vesting_shares=500%20SP) | [1000SP](https://v2.steemconnect.com/sign/delegateVestingShares?delegator=&delegatee=whalebuilder&vesting_shares=1000%20SP) | [5000SP](https://v2.steemconnect.com/sign/delegateVestingShares?delegator=&delegatee=whalebuilder&vesting_shares=5000%20SP) | [custom amount](https://helloacm.com/tools/steemit/sp-delegate-form/). |
| json metadata | {"app":"postpromoter/1.7.4"} |
| Transaction Info | Block #19951429/Trx 3ff560fa9e2905cbc850fb566e27f050a8df37ba |
View Raw JSON Data
{
"trx_id": "3ff560fa9e2905cbc850fb566e27f050a8df37ba",
"block": 19951429,
"trx_in_block": 31,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-17T14:48:09",
"op": [
"comment",
{
"parent_author": "drewie",
"parent_permlink": "making-a-steembackeddollar-currency-converter-on-java",
"author": "whalebuilder",
"permlink": "re-drewie-making-a-steembackeddollar-currency-converter-on-java-20180217t144803619z",
"title": "re-drewie-making-a-steembackeddollar-currency-converter-on-java-20180217t144803619z",
"body": "You got a 4.36% upvote from @whalebuilder courtesy of @drewie. Join @whalebuilder family at our [Discord Channel](https://discord.gg/heYnjCf). Don't let your precious stake(SP) go stale...Make it do more so you have to do less. Deligate it to @whalebuilder by clicking on one of the ready to delegate links: [50SP](https://steemconnect.com/sign/delegateVestingShares?delegator=&delegatee=whalebuilder&vesting_shares=50%20SP) | [100SP](https://v2.steemconnect.com/sign/delegateVestingShares?delegator=&delegatee=whalebuilder&vesting_shares=100%20SP) | [250SP](https://v2.steemconnect.com/sign/delegateVestingShares?delegator=&delegatee=whalebuilder&vesting_shares=250%20SP) | [500SP](https://v2.steemconnect.com/sign/delegateVestingShares?delegator=&delegatee=whalebuilder&vesting_shares=500%20SP) | [1000SP](https://v2.steemconnect.com/sign/delegateVestingShares?delegator=&delegatee=whalebuilder&vesting_shares=1000%20SP) | [5000SP](https://v2.steemconnect.com/sign/delegateVestingShares?delegator=&delegatee=whalebuilder&vesting_shares=5000%20SP) | [custom amount](https://helloacm.com/tools/steemit/sp-delegate-form/).",
"json_metadata": "{\"app\":\"postpromoter/1.7.4\"}"
}
]
}whalebuilderupvoted (4.36%) @drewie / making-a-steembackeddollar-currency-converter-on-java2018/02/17 14:47:48
whalebuilderupvoted (4.36%) @drewie / making-a-steembackeddollar-currency-converter-on-java
2018/02/17 14:47:48
| voter | whalebuilder |
| author | drewie |
| permlink | making-a-steembackeddollar-currency-converter-on-java |
| weight | 436 (4.36%) |
| Transaction Info | Block #19951422/Trx 75948c0723fccbf19e705e754d2263ee21858f12 |
View Raw JSON Data
{
"trx_id": "75948c0723fccbf19e705e754d2263ee21858f12",
"block": 19951422,
"trx_in_block": 1,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-17T14:47:48",
"op": [
"vote",
{
"voter": "whalebuilder",
"author": "drewie",
"permlink": "making-a-steembackeddollar-currency-converter-on-java",
"weight": 436
}
]
}2018/02/17 14:14:42
2018/02/17 14:14:42
| parent author | drewie |
| parent permlink | making-a-steembackeddollar-currency-converter-on-java |
| author | seakraken |
| permlink | re-drewie-making-a-steembackeddollar-currency-converter-on-java-20180217t141442055z |
| title | re-drewie-making-a-steembackeddollar-currency-converter-on-java-20180217t141442055z |
| body | Release the Kraken! You got a 0.97% upvote from @seakraken courtesy of @drewie! |
| json metadata | {"app":"postpromoter/1.7.4"} |
| Transaction Info | Block #19950760/Trx fd430cda1f860351ae23c71491a32e07f850f0f3 |
View Raw JSON Data
{
"trx_id": "fd430cda1f860351ae23c71491a32e07f850f0f3",
"block": 19950760,
"trx_in_block": 3,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-17T14:14:42",
"op": [
"comment",
{
"parent_author": "drewie",
"parent_permlink": "making-a-steembackeddollar-currency-converter-on-java",
"author": "seakraken",
"permlink": "re-drewie-making-a-steembackeddollar-currency-converter-on-java-20180217t141442055z",
"title": "re-drewie-making-a-steembackeddollar-currency-converter-on-java-20180217t141442055z",
"body": "Release the Kraken! You got a 0.97% upvote from @seakraken courtesy of @drewie!",
"json_metadata": "{\"app\":\"postpromoter/1.7.4\"}"
}
]
}seakrakenupvoted (0.97%) @drewie / making-a-steembackeddollar-currency-converter-on-java2018/02/17 14:09:45
seakrakenupvoted (0.97%) @drewie / making-a-steembackeddollar-currency-converter-on-java
2018/02/17 14:09:45
| voter | seakraken |
| author | drewie |
| permlink | making-a-steembackeddollar-currency-converter-on-java |
| weight | 97 (0.97%) |
| Transaction Info | Block #19950661/Trx 8e62339481286bc9d2c4427c82521d5e3095510f |
View Raw JSON Data
{
"trx_id": "8e62339481286bc9d2c4427c82521d5e3095510f",
"block": 19950661,
"trx_in_block": 47,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-17T14:09:45",
"op": [
"vote",
{
"voter": "seakraken",
"author": "drewie",
"permlink": "making-a-steembackeddollar-currency-converter-on-java",
"weight": 97
}
]
}2018/02/17 14:04:42
2018/02/17 14:04:42
| parent author | drewie |
| parent permlink | making-a-steembackeddollar-currency-converter-on-java |
| author | canalcrypto |
| permlink | re-drewie-making-a-steembackeddollar-currency-converter-on-java-20180217t140442545z |
| title | re-drewie-making-a-steembackeddollar-currency-converter-on-java-20180217t140442545z |
| body | Thanks for your contribution @drewie, you got a 20.80% upvote from @canalcrypto! 70% of your contribution goes to our delegators so if you'd like to help us push posts even harder while earning some extra steems please consider delegating to @canalcrypto. You can delegate your SP here: https://steembottracker.com/delegation.html (Delegator = your username, delegatee = canalcrypto), thanks in advance for your support. |
| json metadata | {"app":"postpromoter/1.8.3"} |
| Transaction Info | Block #19950560/Trx 2c318f46b03caf112eaad6292a36147ddbc4e8e4 |
View Raw JSON Data
{
"trx_id": "2c318f46b03caf112eaad6292a36147ddbc4e8e4",
"block": 19950560,
"trx_in_block": 36,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-17T14:04:42",
"op": [
"comment",
{
"parent_author": "drewie",
"parent_permlink": "making-a-steembackeddollar-currency-converter-on-java",
"author": "canalcrypto",
"permlink": "re-drewie-making-a-steembackeddollar-currency-converter-on-java-20180217t140442545z",
"title": "re-drewie-making-a-steembackeddollar-currency-converter-on-java-20180217t140442545z",
"body": "Thanks for your contribution @drewie, you got a 20.80% upvote from @canalcrypto!\n70% of your contribution goes to our delegators so if you'd like to help us push posts even harder while earning some extra steems please consider delegating to @canalcrypto. You can delegate your SP here: https://steembottracker.com/delegation.html (Delegator = your username, delegatee = canalcrypto), thanks in advance for your support.\n",
"json_metadata": "{\"app\":\"postpromoter/1.8.3\"}"
}
]
}canalcryptoupvoted (20.80%) @drewie / making-a-steembackeddollar-currency-converter-on-java2018/02/17 14:03:18
canalcryptoupvoted (20.80%) @drewie / making-a-steembackeddollar-currency-converter-on-java
2018/02/17 14:03:18
| voter | canalcrypto |
| author | drewie |
| permlink | making-a-steembackeddollar-currency-converter-on-java |
| weight | 2080 (20.80%) |
| Transaction Info | Block #19950532/Trx bd0d9b2059b7e56ab4c24fdf49cb0c827248d5b3 |
View Raw JSON Data
{
"trx_id": "bd0d9b2059b7e56ab4c24fdf49cb0c827248d5b3",
"block": 19950532,
"trx_in_block": 14,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-17T14:03:18",
"op": [
"vote",
{
"voter": "canalcrypto",
"author": "drewie",
"permlink": "making-a-steembackeddollar-currency-converter-on-java",
"weight": 2080
}
]
}drewiesent 0.050 SBD to @therising- "https://steemit.com/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java"2018/02/17 13:59:12
drewiesent 0.050 SBD to @therising- "https://steemit.com/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java"
2018/02/17 13:59:12
| from | drewie |
| to | therising |
| amount | 0.050 SBD |
| memo | https://steemit.com/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java |
| Transaction Info | Block #19950450/Trx 9453b68c895db0885bb1f77c7351aea09b1c9f0a |
View Raw JSON Data
{
"trx_id": "9453b68c895db0885bb1f77c7351aea09b1c9f0a",
"block": 19950450,
"trx_in_block": 42,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-17T13:59:12",
"op": [
"transfer",
{
"from": "drewie",
"to": "therising",
"amount": "0.050 SBD",
"memo": "https://steemit.com/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java"
}
]
}drewiesent 0.050 SBD to @whalebuilder- "https://steemit.com/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java"2018/02/17 13:58:48
drewiesent 0.050 SBD to @whalebuilder- "https://steemit.com/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java"
2018/02/17 13:58:48
| from | drewie |
| to | whalebuilder |
| amount | 0.050 SBD |
| memo | https://steemit.com/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java |
| Transaction Info | Block #19950442/Trx 743d23fe785651c654dadbc80aac3fe451f229b5 |
View Raw JSON Data
{
"trx_id": "743d23fe785651c654dadbc80aac3fe451f229b5",
"block": 19950442,
"trx_in_block": 7,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-17T13:58:48",
"op": [
"transfer",
{
"from": "drewie",
"to": "whalebuilder",
"amount": "0.050 SBD",
"memo": "https://steemit.com/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java"
}
]
}2018/02/17 13:58:03
2018/02/17 13:58:03
| from | drewie |
| to | booster |
| amount | 0.001 SBD |
| memo | https://steemit.com/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java |
| Transaction Info | Block #19950427/Trx 90b7e1d451cef223d9e24a05b862a1a95584465e |
View Raw JSON Data
{
"trx_id": "90b7e1d451cef223d9e24a05b862a1a95584465e",
"block": 19950427,
"trx_in_block": 28,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-17T13:58:03",
"op": [
"transfer",
{
"from": "drewie",
"to": "booster",
"amount": "0.001 SBD",
"memo": "https://steemit.com/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java"
}
]
}drewiesent 0.050 SBD to @moneymatchgaming- "https://steemit.com/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java"2018/02/17 13:57:33
drewiesent 0.050 SBD to @moneymatchgaming- "https://steemit.com/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java"
2018/02/17 13:57:33
| from | drewie |
| to | moneymatchgaming |
| amount | 0.050 SBD |
| memo | https://steemit.com/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java |
| Transaction Info | Block #19950417/Trx 18485bdecf2af4a358f61d1ecfc7c253fe2a7410 |
View Raw JSON Data
{
"trx_id": "18485bdecf2af4a358f61d1ecfc7c253fe2a7410",
"block": 19950417,
"trx_in_block": 17,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-17T13:57:33",
"op": [
"transfer",
{
"from": "drewie",
"to": "moneymatchgaming",
"amount": "0.050 SBD",
"memo": "https://steemit.com/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java"
}
]
}drewiesent 0.050 SBD to @seakraken- "https://steemit.com/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java"2018/02/17 13:57:00
drewiesent 0.050 SBD to @seakraken- "https://steemit.com/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java"
2018/02/17 13:57:00
| from | drewie |
| to | seakraken |
| amount | 0.050 SBD |
| memo | https://steemit.com/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java |
| Transaction Info | Block #19950406/Trx d58f810f3aba4b6188e820fdfac73e69b8d90d13 |
View Raw JSON Data
{
"trx_id": "d58f810f3aba4b6188e820fdfac73e69b8d90d13",
"block": 19950406,
"trx_in_block": 4,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-17T13:57:00",
"op": [
"transfer",
{
"from": "drewie",
"to": "seakraken",
"amount": "0.050 SBD",
"memo": "https://steemit.com/utopian-io/@drewie/making-a-steembackeddollar-currency-converter-on-java"
}
]
}Manabar
Voting Power100.00%
Downvote Power100.00%
Resource Credits100.00%
Reputation Progress76.39%
{
"voting_manabar": {
"current_mana": "12616857890",
"last_update_time": 1750281105
},
"downvote_manabar": {
"current_mana": 3154214473,
"last_update_time": 1750281105
},
"rc_account": {
"account": "drewie",
"rc_manabar": {
"current_mana": "14804426658",
"last_update_time": 1750281105
},
"max_rc_creation_adjustment": {
"amount": "2020748973",
"precision": 6,
"nai": "@@000000037"
},
"max_rc": "14637606863"
}
}Account Metadata
| POSTING JSON METADATA | |
| profile | {"profile_image":"https://i.hizliresim.com/jy3aoW.jpg","about":"Trader,Traveler,Translator"} |
| JSON METADATA | |
| profile | {"profile_image":"https://i.hizliresim.com/jy3aoW.jpg","about":"Trader,Traveler,Translator"} |
{
"posting_json_metadata": {
"profile": {
"profile_image": "https://i.hizliresim.com/jy3aoW.jpg",
"about": "Trader,Traveler,Translator"
}
},
"json_metadata": {
"profile": {
"profile_image": "https://i.hizliresim.com/jy3aoW.jpg",
"about": "Trader,Traveler,Translator"
}
}
}Auth Keys
Owner
Single Signature
Public Keys
STM5B4WDqftih5qFnAyKkqd2HBp7gBtnDJCEgB4Ez8egVSBAGRQqX1/1
Active
Single Signature
Public Keys
STM4yj5yoBCcgFewy57kAv4Gnp5Nz3RM5cszTvpkjomF1P9Bgb4HY1/1
Posting
Single Signature
Public Keys
STM8CcZDAJpMForaWEu2kQqcCYbhav23UxnLZ2KjeCQgKNcb991Gx1/1
Memo
STM8QGFAoptZqtVZpwqEEB8GkSAB6kp5oaNVdRu6BJPanCHQ5BgNU
{
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"STM5B4WDqftih5qFnAyKkqd2HBp7gBtnDJCEgB4Ez8egVSBAGRQqX",
1
]
]
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"STM4yj5yoBCcgFewy57kAv4Gnp5Nz3RM5cszTvpkjomF1P9Bgb4HY",
1
]
]
},
"posting": {
"weight_threshold": 1,
"account_auths": [
[
"dmania.app",
1
],
[
"dtube.app",
1
],
[
"utopian.app",
1
]
],
"key_auths": [
[
"STM8CcZDAJpMForaWEu2kQqcCYbhav23UxnLZ2KjeCQgKNcb991Gx",
1
]
]
},
"memo": "STM8QGFAoptZqtVZpwqEEB8GkSAB6kp5oaNVdRu6BJPanCHQ5BgNU"
}Witness Votes
0 / 30
No active witness votes.
[]