Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void CScreen::Scatter()
- {
- //create a matrix object and use attron and color_pair() to be used
- // in order to fill the screen
- CMatrix Screen(LINES, COLS);//LINES AND COLS from ncurses library.
- //for(int i = 0; i < LAST_COLOR_PAIR_INDEX; ++i)
- while(clock() < 120)
- {
- int pair1 = rand() % 7 + 1;
- int pair2 = rand() % 7 + 1;
- if(pair1 != pair2)
- {
- attron(COLOR_PAIR(pair1));
- Screen.Fill(m_dispChar, m_sleep);
- refresh();
- usleep(999999);
- }
- }
- } // end of "CScreen::Scatter"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement